FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

v2.8.5 · dj31416/jQuery-tinyMap@044c930 · GitHub

Repository navigation

Commit 044c930

Browse files
committed
v2.8.5
*路徑規劃新增 direction.autoViewport (bool 預設 true) 參數可設置是否要自動縮放該路線資訊。
1 parent afcca0b commit 044c930

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

‎jquery.tinyMap.js‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,12 @@
2222
* http://app.essoduke.org/tinyMap/
2323
*
2424
* @author: Essoduke Chang
25-
* @version: 2.8.4
25+
* @version: 2.8.5
2626
*
2727
* [Changelog]
28-
* 修正若 markerFitBounds 設為 true 則有部份的 marker 點選時無法開啟 infoWindow 的錯誤。
29-
* 加入 infoWindowAutoClose (bool) 參數,可設置是否在點選標記時自動關閉其他已開啟的 infoWindow。
28+
* 路徑規劃新增 direction.autoViewport (bool 預設 true) 參數可設置是否要自動縮放該路線資訊。
3029
*
31-
* Release 2014.08.05.161554
30+
* Release 2014.08.06.184249
3231
*/
3332
;(function ($, window, document, undefined) {
3433

@@ -291,7 +290,7 @@
291290
*/
292291
TinyMap.prototype = {
293292

294-
VERSION: '2.8.4',
293+
VERSION: '2.8.5',
295294

296295
// Layers container
297296
_polylines: [],
@@ -932,6 +931,12 @@
932931
if (undefined !== request.origin && undefined !== request.destination) {
933932
directionsService.route(request, function (response, status) {
934933
if (status === google.maps.DirectionsStatus.OK) {
934+
console.dir(opt.autoViewport);
935+
if (undefined !== opt.autoViewport) {
936+
directionsDisplay.setOptions({
937+
'preserveViewport': false === opt.autoViewport ? true : false
938+
});
939+
}
935940
directionsDisplay.setDirections(response);
936941
}
937942
});

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL