开发者

How to set the google-maps marker as it is showed on the original website

Try to Search the first address on google maps, and click on it :

it will show us a marker with a photo (if avaiable), des开发者_如何学Ccription, and some links. I'd like to add the same marker in my web application.

Which API I need to use? At the moment I just make my own string and append it :

var finestra='';
finestra += '<div style="position:relative;width:200px;">';
finestra += '<div style="position:relative;float:left; color:#000000;" class=canale>';
finestra += 'Archimede<br />Via Brennero,12<br />38100 Trento(TN)<br />c.+39 555555555';
finestra += '</div>';
finestra += '</div>';

var marker = createMarker(map.getCenter());
map.setCenter(new GLatLng(46.084989,11.118851), 16, G_NORMAL_MAP);
map.addOverlay(marker);
marker.openInfoWindowHtml(finestra);    

But I need the same marker as google maps show on the original website. Is it possible?


You need to use a custom overlay . Here is an example: custom marker

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜