Google Static Maps API 不再需要 Maps API 金鑰!不需要 JavaScript。我們只需建立網址,再將網址放入
Google Static Maps 服務現在支援「自訂標記圖示!」
位置參數:

<img>
標記中就大功告成了。Google Static Maps 服務現在支援「自訂標記圖示!」
Google Static Maps API 的網址格式如下:
http://maps.google.com/maps/api/staticmap?parameters
- center(必要)讓地圖鎖定正確位置LatLng(22.662063,120.293001),可以改用代表「地址」 的字串進行指定,例如,「City Hall, New York, NY」地址應該轉換成「City+Hall,New+York,NY」。
sensor=false OR true
- zoom(必要)zoom=0~~~21,center=40.714728,-73.998672&zoom=12&size=400x400&sensor=false
- size(必要)最高可達 640 x 640 像素
- format,接受GIF、JPEG 以及 PNG
- maptype,接受
roadmap,
satellite,
terrain,hibrid,
&maptype=roadmap&sensor=true_or_false - mobile,&maptype=roadmap&mobile=true&sensor=true_or_false
- language
markers
和 path
參數) 都可接受多個位置。在這種情況下,請以直立線 (|
) 字元分隔位置。- markers在地圖上的不同位置放置選用地標 (使用
markers
參數)markers
參數會為一系列位置設定一系列 (一或多個) 標記。單一markers
宣告內定義的每個標記皆需採用相同的視覺樣式;如果您想顯示不同樣式的標記,您必須提供多個markers
參數並於每個參數設定不同樣式。markers=markerStyles|markerLocation1|markerLocation2|...
等。樣式有size:
(選用) 從{tiny, mid, small}
集合中指定標記的大小。color:
(選用){black, brown, green,
purple, yellow, blue, gray, orange, red, white}。label:
(選用)會從 {A-Z, 0-9} 系列指定單一大寫英數字元。定義一系列樣式和三個位置center=Williamsburg,Brooklyn,NY&zoom=13&size=400x400&markers=color:blue|label:S|11211|11206|11222&sensor=true_or_false。如要定義不同樣式的標記,我們必須提供多個markers
參數,center=63.259591,-144.667969&zoom=6&size=400x400&markers=color:blue|label:S|62.107733,-145.541936&markers=size:tiny|color:green|Delta+Junction,AK&markers=size:mid|color:0xFFFF00|label:C|Tok,AK&sensor=false, 可能希望使用自訂圖示,&markers=icon:http://chart.apis.google.com/chart%3Fchst%3Dd_map_pin_icon%26chld%3Dcafe%257C996600|224+West+20th+Street|75+9th+Ave|700+E+9th+St&sensor=true_or_false
- path,path=color:0x0000ff|weight:5|40.737102,-73.990318|40.749825,-73.987963|40.752946,-73.987384|40.755823,-73.986397
- visible指定可見位置,以便設定「檢視區」
- 自訂markers與path可創作非常有特色的靜態地圖。
- sensor(必要)true or false
