| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,13 +22,12 @@ | |||
| 22 | 22 | * http://app.essoduke.org/tinyMap/ | |
| 23 | 23 | * | |
| 24 | 24 | * @author: Essoduke Chang | |
| 25 | - * @version: 2.8.4 | ||
| 25 | + * @version: 2.8.5 | ||
| 26 | 26 | * | |
| 27 | 27 | * [Changelog] | |
| 28 | - * 修正若 markerFitBounds 設為 true 則有部份的 marker 點選時無法開啟 infoWindow 的錯誤。 | ||
| 29 | - * 加入 infoWindowAutoClose (bool) 參數,可設置是否在點選標記時自動關閉其他已開啟的 infoWindow。 | ||
| 28 | + * 路徑規劃新增 direction.autoViewport (bool 預設 true) 參數可設置是否要自動縮放該路線資訊。 | ||
| 30 | 29 | * | |
| 31 | - * Release 2014.08.05.161554 | ||
| 30 | + * Release 2014.08.06.184249 | ||
| 32 | 31 | */ | |
| 33 | 32 | ;(function ($, window, document, undefined) { | |
| 34 | 33 | ||
@@ -291,7 +290,7 @@ | |||
| 291 | 290 | */ | |
| 292 | 291 | TinyMap.prototype = { | |
| 293 | 292 | ||
| 294 | - VERSION: '2.8.4', | ||
| 293 | + VERSION: '2.8.5', | ||
| 295 | 294 | ||
| 296 | 295 | // Layers container | |
| 297 | 296 | _polylines: [], | |
@@ -932,6 +931,12 @@ | |||
| 932 | 931 | if (undefined !== request.origin && undefined !== request.destination) { | |
| 933 | 932 | directionsService.route(request, function (response, status) { | |
| 934 | 933 | 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 | + } | ||
| 935 | 940 | directionsDisplay.setDirections(response); | |
| 936 | 941 | } | |
| 937 | 942 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments