Plugin Directory

Changeset 1687156


Ignore:
Timestamp:
06/28/2017 05:42:46 PM (9 years ago)
Author:
Fishre
Message:

Change Marker name to TBMarker, avoid javascript class name confusion.

Location:
travel-maps/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • travel-maps/trunk/assets/js/map.js

    r1683851 r1687156  
    1010 * @constructor
    1111 */
    12 function Marker(center, data, onclick) {
     12function TBMarker(center, data, onclick) {
    1313    this._center = center;
    1414    this._width = 166;
     
    1919
    2020// Inherit baidu map's overlay
    21 Marker.prototype = new BMap.Overlay();
     21TBMarker.prototype = new BMap.Overlay();
    2222
    2323
    24 Marker.prototype.initialize = function (map) {
     24TBMarker.prototype.initialize = function (map) {
    2525
    2626    this._map = map;
     
    7171}
    7272
    73 Marker.prototype.draw = function () {
     73TBMarker.prototype.draw = function () {
    7474    var position = this._map.pointToOverlayPixel(this._center);
    7575    this._div.style.left = position.x - this._width / 2  - 3 + "px";
     
    9191}
    9292
    93 Marker.prototype.show = function () {
     93TBMarker.prototype.show = function () {
    9494    if (this._div) {
    9595        this._div.style.display = "";
     
    107107}
    108108
    109 Marker.prototype.hide = function () {
     109TBMarker.prototype.hide = function () {
    110110    if (this._div) {
    111111        this._div.style.display = "none";
     
    114114}
    115115
    116 Marker.prototype.toggle = function () {
     116TBMarker.prototype.toggle = function () {
    117117    if (this._div) {
    118118        if (this._div.style.display == "") {
  • travel-maps/trunk/include/travel-maps-api.php

    r1683851 r1687156  
    214214
    215215                    data.marker = vectorMarker;
    216                     var marker = new Marker(point, data);
     216                    var marker = new TBMarker(point, data);
    217217
    218218                    map.addOverlay(marker);
Note: See TracChangeset for help on using the changeset viewer.