开发者

Google maps Api v3 Positioning Custom Controls

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 开发者_如何学Cstyle 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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜