Postgis polygon to Google Maps polygon

689 views
Skip to first unread message

Jeremy Hageman

unread,
Feb 12, 2012, 2:10:31 PM2/12/12
to RGeo-Users
I have been following the RGeo blog tutorials (http://www.daniel-
azuma.com/blog/archives/191). I have zipcode data read into my
database and am able to access the region data via RGeo factories.
What is the best way to display the zipcode polygons on a Google Map?
I know I can probably just iterate through all of the point in the
polygon data to draw the regions, but I'm curious if there are more
efficient ways to load the data into a Google map?

ErnestoE

unread,
May 13, 2012, 8:44:02 PM5/13/12
to rgeo-...@googlegroups.com
Hello there.

I don't see any answer to your question here but it's also something I'm interested at.

I'd like to display a lot of polygons (not necessarily zip codes) into either Google Maps or any other Open Source geolocation framework.

Can someone point me in the right direction of geolocation display?

Tony Collen

unread,
May 14, 2012, 3:48:21 PM5/14/12
to rgeo-...@googlegroups.com
Geoserver (www.geoserver.org) hooked into postGIS, and openlayers
should get you what you need.

If you install geoserver, there are a number of example maps using
openlayers. It's pretty easy to hook geoserver into postgis for
layers.

- Tony

Jeremy Hageman

unread,
May 15, 2012, 12:32:13 PM5/15/12
to RGeo-Users
I ended up adding the following code to my shapefile reader to encode
the polyline data for the fastest display on Google Maps:

https://gist.github.com/1361880

Then just used the decodePath method to actually render the paths:

https://developers.google.com/maps/documentation/javascript/reference#encoding

On May 13, 5:44 pm, ErnestoE <ernes...@gmail.com> wrote:
> Hello there.
>
> I don't see anyanswer to your questionrespuesta a su preguntahere but it's also something I'm
> interested at.
>
> I'd like to display a lot of polygons (not necessarily zip codes) into) eneither Google Maps or any other Open Source geolocation framework.
>
> Can someone point me in the right direction of geolocation display?
>
>
>
>
>
>
>
> On Sunday, February 12, 2012 2:10:31 PM UTC-5, Jeremy Hageman wrote:
>
> > I have been following the RGeo blog tutorials (http://www.daniel-> azuma.com/blog/archives/191). I have zipcode data read into my> database and am able to access the region data via RGeo factories.> What is the best way to display the zipcode polygons on a Google Map?>I know ISé quecan probably just iterate through all of the point in the> polygon data to draw the regions, but I'm curiousif there are moresi hay más> efficient ways to load the data into a Google map?
Reply all
Reply to author
Forward
0 new messages