NetManiac

Witold Rugowski on web20 wave with Ruby on Rails

How to create shapes for Google Maps?

Posted on February 9, 2007 - Filed Under Google Maps, JavaScript

I’m using Google Maps API and currently need to draw some shapes on it. Of course GPolygon is right for me, but I need data for it. Like countries shapes. So I wrote simple tool in JavaScript to draw shape on map, and get corresponding data – array with vertexes latitude and longitude.

As for now version 0.1 was tested in Firefox, there are some quirks with my IE, which I will iron out in next releases. Data can be presented as array of arrays with latitude and longitude or array with GLatLng objects – both are suitable to copy and paste to JavaScript code. I plan also output in SQL format.

And my tool is available under http://nhw.pl/download/points.html.

Popularity: 6% [?]

Hits for this post: 7429

Similar Posts

Comments

2 Responses to “How to create shapes for Google Maps?”

  1. pier on February 12th, 2007 19:24

    Great stuf
    Tx a lot for sharing it.

  2. Your page is now on StumbleUpon! on June 5th, 2008 23:54

    Kramer auto Pingback[...] Your page is on StumbleUpon [...]

Leave a Reply