版本歷史
-
2.0.1
- 修正當座標或地址無效時的未預期錯誤。
- 若標記說明包含 HTML Code 時,icon title 將只保留文字而忽略任何標籤。
-
2.0
- 使用 Google Map API v3 改寫
- 地圖大小由 CSS 控制
- 加入路徑規劃功能
- 參數比照 Google Map API
- 已知問題:路徑規劃無法使用 zoom 控制縮放等級。
<!-- Include Google Map API (Google Map API v3 已不需使用 API Key) -->
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="jquery.tinyMap-2.0.1.js"></script>
[{addr: '標記地址或座標', text: '標記說明', icon: '圖示 URL'}]
地址: [{addr: '台北市忠孝東路', text: '標記說明', icon: '圖示 URL'}]
座標: [{addr: '00.0000, 00.0000', text: '標記說明', icon: '圖示 URL'}]
[{from: '起點地址', to: '目的地址', travel: '交通類型:DRIVING|WALKING|BICYCLING'}]
$(function(){
$('#map').tinyMap();
});
$(function(){
$('#map').tinyMap({
center: {x: '25.03369510279853', y: '121.56480431556702'},
zoom: 16
});
});
$(function(){
$('#map').tinyMap({
center: '台北縣三重市',
zoom: 13,
mapTypeId: 'hybrid',
marker: [
{addr: '台北市信義區市府路1號', text: '台北市政府'},
{addr: '台北市士林區至善路二段221號', text: '國立故宮博物院', icon: '4.png'}
]
});
});
$(function(){
$('#map').tinyMap({
direction: [
{from: '台北市松壽路1號', to: '台北車站', travel: 'driving'},
{from: '台北市承德路二段235號', to: '台北市中華路一段', travel: 'walking'}
]
});
});