Chris Apolzon
MySQL Spatial is an interesting idea. I hadn't heard of that (I'm
relatively new to the Maps community, if it wasn't obvious already).
I'm on a Windows server with Microsoft SQL, so if I do wind up storing
my points in a database, I may just have to port some of that MySQL
code into Microsoft SQL to make a few operations a little easier.

bratliff
In truly showing my naiveness, I hadn't realized the SVG format had so
many cool options - I'm still very new to it too. Indeed it does seem
like it would be extremely challenging to write total support and
conversion from SVG into google map polygons. Luckily, my polygon
needs are really quite simple and would only use the <polygon> element
as well as it's attributes and the <g> element to group the polygons
into layers for each of my map types (floors). And yes, this is for my
floor plan project. Each floor of our 5 story building has it's own
custom map type and it's own set of polygons. The reason I considered
SVG in the first place was because of simple/easy editability. Adobe
Illustrator supports the SVG format and can output it quite
efficiently. Each layer in Illustrator generates a <g> element and
filled paths create the <polygon> element. Color, opacity, stroke, and
even element ID are all set too, based on familiar Illustrator
options. I (and my other users) can use my existing maps images as a
template layer and literally draw the polygons I need in Google Maps
right on the map, and then just save as SVG. I'm considering solving
the points/coordinate conversion issue by setting up the Artboard in
illustrator to match the bounds of my world coordinate projection
(except in inches instead of arbitrary -10 through 10 world units),
which would be a simple operation. With the Artboard matching my
coordinate system, I could use it to crosscheck to make sure my
conversions are right when I go from SVG's pixel coordinates to my
custom world units. My current polygons are constructed from the
objects/arrays at the bottom of this message, so it's already doing
some polygon construction any way.

Marcelo
I actually hadn't considered using encoded polylines because I didn't
think my polygons/polylines were complex enough to warrant high-power
stuff like that. I've only got 11 polygons so far, with maybe 30-40 to
come in total. If it were added/finished in v3 do you think it would
then be worth using, giving my small amount and lack of complexity?
P.S. You're a Perl guy too? :)


objMapTypes.main1.polygons = {
        '150': {'path': [ [2.285,-4.7329], [1.845703125,-5.174804688],
[2.080078125,-5.418945313], [2.5390625,-4.989257813],
[2.001953125,-4.452148438], [3.994140625,-2.469726563],
[4.130859375,-2.613769531], [2.139,-4.5864] ]}
};
objMapTypes.main2.polygons = {
        '201': {'path': [ [2.4561,-4.9087], [3.5791,-3.7173],
[4.1210,-4.2934], [2.9590,-5.4507] ]},
        '201A': {'path': [ [-0.8496,-6.7080], [0.0781,-6.7080],
[0.0781,-8.0361], [-0.8496,-8.0361] ]},
        '202': {'path': [ [3.623046875,-6.759277344],
[3.979492188,-6.402832031], [3.374023438,-5.758300781],
[2.98828125,-6.139160156] ]},
        '235': {'path': [ [-2.6945,-5.3408], [-4.7453,-5.3408],
[-4.7453,-3.3486], [-4.3449,-3.3486], [-3.7492,-2.6650],
[-3.7492,-1.2100], [-3.5832,-1.2100], [-3.5832,-2.5479],
[-2.5090,-2.5479], [-2.5090,-3.6904], [-2.6945,-3.6904] ]}
};
objMapTypes.main3.polygons = {
        '301': {'path': [ [3.5156,-3.8418], [4.7754,-5.0820],
[3.7012,-6.2246], [2.4023,-4.9355] ]},
        '320': {'path': [ [0.1074,-5.6143], [0.1855,-5.6143],
[0.1855,-5.4189], [-0.6836,-5.4189], [-0.6836,-5.6143],
[0.1074,-5.6143], [0.3027,-5.8682], [-0.0879,-6.2393],
[0.4395,-6.7764], [0.8008,-6.4053], [0.3027,-5.8682] ]},
        '380': {'path': [ [-4.7900,-7.3354], [-4.5020,-7.3354],
[-4.5020,-7.8213], [-4.7900,-7.8213], [-4.7900,-6.0439],
[-4.5020,-6.0439], [-4.5020,-6.5518], [-4.7900,-6.5518] ]}
};
objMapTypes.main4.polygons = {
        '401': {'path': [ [25.5,-119], [25.5,-86], [14.6,-86],
[14.6,-119] ]},
        '420': {'path': [ [-66.9,-145], [-66.9,-134], [-69.1,-134],
[-69.1,-128], [-66.9,-128], [-66.9,-118], [-69.1,-118],
[-69.1,-145] ]}
};
objMapTypes.main5.polygons = {
        '520': {'path': [ [64.2,-94], [48.3,-94], [48.3,-88], [64.2,-88] ]}
};

// Floors main4 and main5 haven't been updated to the new coordinate
system yet.



On Mar 15, 10:46 am, Marcelo <[email protected]> wrote:
> On Mar 15, 2:44 pm, bratliff <[email protected]> wrote:
>
>
>
> > V3 does not support encoded polys.  
>
> Ha! I hadn't noticed that you cannot setPath(encoded), and I think
> it's curious because the DirectionsStep returns encoded_lat_lngs among
> other fields.
>
> >V2 encoded polys are confusing &
> > inadequate.
>
> I still think they'd be a better, more compact format to store than
> SVG, and the conversion utilities are readily available in various
> languages from Marc McClur's page.
>
> >  I believe his application involves floor plans which
> > cannot be described with five decimal places of Lat/Lon precision.  I
> > believe it uses a Euclidean (flat) projection.
>
> You can use any precision. You're not limited to 5 decimals.
>
> --
> Marcelo -http://maps.forum.nu
> --

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to