1

我有一个网站,它使用谷歌地图来绘制注册企业的位置。这使用 javascript 并显示橙色标记以查明确切位置。我正在尝试建立一个指向实际谷歌地图页面的链接,我的代码正在做我想做的事情,除了标记没有出现。我可以添加其他代码以使其显示吗?

<a href="http://maps.google.com/maps?ll=<?php echo $business_lat; ?>,<?php echo $business_lon; ?>&z=11&t=m&hl=en-US&mapclient=apiv3" target="_blank">Full Sized Map</a>
4

1 回答 1

0

To add a pin you need the q parameter. It holds q=latitude+longitude+(url-encoded-text)

Here is an example of hybrid map with weather - pin at Embassy Suites, map centered on Horseshoe Falls

https://maps.google.com/maps?hl=en&ll=43.076,-79.074&spn=0.0212,0.0496&t=h&z=16&q=43.0795N+79.0818W+(Nice%20Hotel)&lci=weather

  • hl= two letter language code
  • ll= the map center using coma separated +/- values
  • spn= the viewport span in degrees, works with the z parameter
  • t= map type {m|k|h|p}
  • z= is the zoom factor
  • q= latitude+longitude+(url-encoded-text), the lat/lon in q have to be followed by a letter - N/S or E/W instead of using +/-
  • lci= special codes, coma separated - i know of weather, transit_comp, com.panoramio.all
  • layer= additional layers, e.g. t for traffic

Google is changing things with the new Google Maps and a lot of functionality has been removed/replaced. You can check the new Maps Engine here http://mapsengine.google.com/map/

于 2014-01-30T14:40:14.040 回答