views:

65

answers:

1

Hi,

I want to create custom user control in google maps api v3. I want this control show in place where user click on the map. This user control contain pictures and text. I can´t use InfoWindows, beceasue my user control have different look. And i didn´t found way how to style infoWindow only change its inner html. I googled without any good solution. In api v2 I found this http://www.codeproject.com/KB/scripting/Use_of_Google_Map.aspx.

map.controls[google.maps.ControlPosition.TOP_LEFT].push(new MyControl()); this will add mycontrol on top left. And I´m looking for something like that just replace google.maps.ControlPosition.TOP_LEFT with my latlng.... I hope you understand me.

thanks for any help

A: 

In v3 Api you will need to create a custom overlay class. You could use this example http://gmaps-samples-v3.googlecode.com/svn/trunk/latlng-to-coord-control/latlng-to-coord-control.html as a starting point. Just need to replace mouse move events with click events and customise the contents of the window.

Michal