我需要在我的引导程序中实现谷歌地图,但我不确定iframe是否适用于手机,是否有适用于手机和桌面的谷歌地图版本
我试过谷歌但没有出现
<iframe id="maps" width="325" height="208" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"
src="https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=8207+Central+Ave+NE,+Albuquerque,+NM&aq=0&oq=8207+central+ave+ne+a&sll=34.166233,-106.026069&sspn=15.047206,19.753418&ie=UTF8&hq=&hnear=8207+Central+Ave+NE,+Albuquerque,+Bernalillo,+New+Mexico+87108&ll=35.074854,-106.555821&spn=0.00364,0.004823&t=m&z=14&output=embed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=8207+Central+Ave+NE,+Albuquerque,+NM&aq=0&oq=8207+central+ave+ne+a&sll=34.166233,-106.026069&sspn=15.047206,19.753418&ie=UTF8&hq=&hnear=8207+Central+Ave+NE,+Albuquerque,+Bernalillo,+New+Mexico+87108&ll=35.074854,-106.555821&spn=0.00364,0.004823&t=m&z=14" style=" color:#0000FF;text-align:left">View Larger Map</a></small>
答案 0 :(得分:0)
Google Maps API v3是为移动和桌面设备开发的。只需确保设置视口元标记,并设置 html ,正文和地图div (id)的样式 map-canvas 下面):
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map-canvas { height: 100% }
</style>
研究Hello world示例,了解如何使其全部正常运行。