I’m trying to draw a map with google maps javascript api in a custom web page.
All what I’ve found is how to paint over a map, but with a background map. I achieved to draw a map in localhost with custom features.
What I would like is to create my custom map from a data source.
Let’s say that I have a database with the coordinates of different poly forms:
Room1: (0, 0) – (10, 0) – (15, 10) – (10, 15) – (5, 10) – (0, 10) – (0, 0)
Room2: etc…
Then I would like to draw those forms in google maps, so I could use features like mouse moving, zoom and info windows when mouse click in the center of the room to show room info (description, surface, etc…) like google maps does in the maps.
Other option would be to use but then I’m asking how could I implement navigation through the canvas (mouse movement, zoom and info windows basically)
The questions are:
– Is it possible to do it with google maps api? How? (data structure and javascript code)
– If not, which possibilities do I have to implement a control like this?
Ok, here it goes my solution. Hope it helps someone!
It works with jquery, Google Maps V3.
This is the html:
js/GM_LoadMap.js:
To create blank image background:
To show poly forms:
To show info window: