开发者

how do i get rid of these top links in a google map embed?

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=las+vegas&amp;aq=&amp;sll=37.0625,-95.677068&amp;sspn=59.337006,87.275391&amp;ie=开发者_StackOverflowUTF8&amp;hq=&amp;hnear=Las+Vegas,+Clark,+Nevada&amp;z=11&amp;ll=36.114646,-115.172816&amp;output=embed"></iframe>

That code produces a map with links on top for the various viewing modes such as map, satellite, terrain, and earth. Is there a way to get rid of these links?


If you use Google Maps API v3, you can set mapTypeControl to false in the MapOptions passed to the Map constructor, e.g.:

var map = new google.maps.Map(document.getElementById("map_canvas"), 
        {center:new google.maps.LatLng(lat,lon),
         mapTypeId:google.maps.MapTypeId.ROADMAP,
         zoom:initialZoom,
         mapTypeControl:false});

Setting that up is more involved than just plugging the URL into an iframe of course, but you get a lot more flexibility.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜