I'm not sure if mysql has the same st_asgeojson function as PostGIS but if
it does, I've been working on a utility to convert GeoJSON objects (Point,
LineString, Polygon) to Google Maps Vectors (Marker, Polyline, Polygon).
This way you'd be dealing with native JavaScript objects instead of parsing
a gigantic string.

https://github.com/JasonSanford/GeoJSON-to-Google-Maps

On Mon, Feb 28, 2011 at 4:51 PM, Chris Broadfoot <[email protected]> wrote:

> Aha - perhaps some server-side processing would be good here.
>
> If you could return the geometry as an array of floats, that would cut out
> most of your parsing time in JS.
>
> I suggest you change your pipeline to:
>
> -          MySQL table with Geometry field (spatial extension)
> -          Query it, using AsText(geometry) function
> *-          Parse geometry into array of floats*
> -          Send it to javascript in json format
> -          Create an array of LatLng
> -          Using google.maps.Polyline
>
> If that doesn't help, there may be some more improvements possible, such as
> storing a json representation alongside the MySQL geometry upon write.
>
> Chris
>
> --
> 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.
>

-- 
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