Aid*_*ell 14 javascript google-maps-api-3
一直在寻找答案,找不到一个.我正在使用Google Maps V3 API来获取路线和地图.一切都好......
但我想提供一个标准的A标签链接到谷歌地图本身的等效方向.我有2个邮政编码.如何根据2个邮政编码或我的邮政编码生成Google地图指示网址
 google.maps.DirectionsService
Run Code Online (Sandbox Code Playgroud)
我将使用该URL生成"在谷歌地图上查看"按钮和"可打印"按钮.
干杯! 艾登
Gre*_*kes 22
以下是针对不同Google地图功能的一些标准HTML链接.我在这里保留更新的帖子.
//Spaces can be changed to "+" or encoded as "%20".
//Linking to a location (No directions)
https://www.google.com/maps?q=760+West+Genesee+Street+Syracuse+NY+13204
//No starting point (User input required to generate directions).
https://www.google.com/maps?daddr=760+West+Genesee+Street+Syracuse+NY+13204
//With a set location as starting point (Automatically generates directions with no user input required).
https://www.google.com/maps?saddr=760+West+Genesee+Street+Syracuse+NY+13204&daddr=314+Avery+Avenue+Syracuse+NY+13204
//With "My Location" as starting point (Automatically generates directions with no user input required).
https://www.google.com/maps?saddr=My+Location&daddr=760+West+Genesee+Street+Syracuse+NY+13204
//Current Location to Latitude and Longitude
https://www.google.com/maps?saddr=My+Location&daddr=43.12345,-76.12345
//Query search of a Latitude and Longitude
//Also shows setting a default zoom level
https://www.google.com/maps?ll=43.12345,-76.12345&q=food&z=14
//String search as destination
https://www.google.com/maps?saddr=My+Location&daddr=Pinckney+Hugo+Group
Run Code Online (Sandbox Code Playgroud)
        geo*_*zip 10
请参阅此Stackoverflow问题中的链接
http://www.seomoz.org/ugc/everything-you-never-wanted-to-know-about-google-maps-parameters
SADDR =
设置路线搜索的起点.您还可以在括号中将文本添加到此处,以便在侧栏的方向上加粗.
DADDR =
设置方向搜索的结束点,并再次加粗括号中添加的任何文本.您还可以添加"+到:",它将通过点设置.这些可以多次添加.
|   归档时间:  |  
           
  |  
        
|   查看次数:  |  
           17884 次  |  
        
|   最近记录:  |