Changeset 1687156
- Timestamp:
- 06/28/2017 05:42:46 PM (9 years ago)
- Location:
- travel-maps/trunk
- Files:
-
- 2 edited
-
assets/js/map.js (modified) (6 diffs)
-
include/travel-maps-api.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
travel-maps/trunk/assets/js/map.js
r1683851 r1687156 10 10 * @constructor 11 11 */ 12 function Marker(center, data, onclick) {12 function TBMarker(center, data, onclick) { 13 13 this._center = center; 14 14 this._width = 166; … … 19 19 20 20 // Inherit baidu map's overlay 21 Marker.prototype = new BMap.Overlay();21 TBMarker.prototype = new BMap.Overlay(); 22 22 23 23 24 Marker.prototype.initialize = function (map) {24 TBMarker.prototype.initialize = function (map) { 25 25 26 26 this._map = map; … … 71 71 } 72 72 73 Marker.prototype.draw = function () {73 TBMarker.prototype.draw = function () { 74 74 var position = this._map.pointToOverlayPixel(this._center); 75 75 this._div.style.left = position.x - this._width / 2 - 3 + "px"; … … 91 91 } 92 92 93 Marker.prototype.show = function () {93 TBMarker.prototype.show = function () { 94 94 if (this._div) { 95 95 this._div.style.display = ""; … … 107 107 } 108 108 109 Marker.prototype.hide = function () {109 TBMarker.prototype.hide = function () { 110 110 if (this._div) { 111 111 this._div.style.display = "none"; … … 114 114 } 115 115 116 Marker.prototype.toggle = function () {116 TBMarker.prototype.toggle = function () { 117 117 if (this._div) { 118 118 if (this._div.style.display == "") { -
travel-maps/trunk/include/travel-maps-api.php
r1683851 r1687156 214 214 215 215 data.marker = vectorMarker; 216 var marker = new Marker(point, data);216 var marker = new TBMarker(point, data); 217 217 218 218 map.addOverlay(marker);
Note: See TracChangeset
for help on using the changeset viewer.