On Mar 14, 9:26 pm, Brak <[email protected]> wrote: > Yes. I understand SVG isn't supported by all browsers. I'm not > interested in putting SVG directly on the web page at all. I'm talking > about using the SVG file format to store google maps polygon > coordinate points externally from my javascript code.
Why not use encoded polylines? -- Marcelo - http://maps.forum.nu -- > The SVG file > would be parsed and each <polygon> in the file would be rebuilt and > reconstructed on the map as a google.maps.Polygon(). Google Maps > Polygons support are not dependent on a browser's native SVG support. > When the Maps API receives a google.maps.Polygon it creates SVG for > browsers that support it, it creates VML objects if the client is > using IE, and if the browser doesn't support SVG at all, it sends the > request to the tile server and receives image tiles back. Native SVG > support for browsers is irrelevant in terms of what I'm talking about. > I'm only wanting to store the *points* to my polygons in the SVG file, > which are used to create google.maps.Polygon() objects for the API. > > I was curious if anyone had tried this method, had written anything in > v3 code already, or had any tips or understanding of the SVG format > that may make it easier to write. > > On Mar 13, 11:54 am, bratliff <[email protected]> wrote: > > > > > On Mar 12, 7:04 pm, Brak <[email protected]> wrote: > > > > Thanks for the tips bratliff. I was actually expecting i'd have to do > > > some scaling, but I was thinking if I setup my polygons right and the > > > canvas properly in illustrator, I could do some simple conversions on > > > the points to scale them up/down to the right size, so they could > > > relate to my lat/lng system (alternate projection, flat, not > > > spherical). > > > > About the resizing for the zoom levels. Are you sure that will be > > > necessary, since map polygons are scaled automatically when zoomed? I > > > probably didn't really explain that portion of my original post. I'd > > > want to go from SVG XML through a few conversions resulting in native > > > Google map polygons and polylines, which would be handled by the API. > > > That would remove the need for me to deal with an SVG overlay and > > > matching up the lines and points etc. > > > Some browsers like Internet Explorer do not support SVG. Safari / > > Chrome / iPhone may not either. Both Firefox & Opera do support SVG. -- 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.
