Changeset 800e4b1 in osmose-frontend


Ignore:
Timestamp:
Mar 18, 2014 10:09:00 PM (6 years ago)
Author:
Frédéric Rodrigo <fred.rodrigo@…>
Branches:
master
Children:
0da0627
Parents:
9c41fa6
git-author:
Frédéric Rodrigo <fred.rodrigo@…> (15/03/2014 11:55:14)
git-committer:
Frédéric Rodrigo <fred.rodrigo@…> (18/03/2014 22:09:00)
Message:

Use URL by default as param for get markers

Location:
static/map
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • static/map/Osmose.Errors.js

    ra870ebb r800e4b1  
    4545        color: '#fff', 
    4646      }); 
    47       this._params.item = urlPart.item; 
    48       this._params.level = urlPart.level; 
    49       this._params.tags = urlPart.tags; 
    50       this._params.fixable = urlPart.fixable; 
     47      if (urlPart.item) { 
     48        this._params.item = urlPart.item; 
     49      } else { 
     50        delete this._params.item; 
     51      } 
     52      if (urlPart.level) { 
     53        this._params.level = urlPart.level; 
     54      } else { 
     55        delete this._params.level; 
     56      } 
     57      if (urlPart.tags) { 
     58        this._params.tags = urlPart.tags; 
     59      } else { 
     60        delete this._params.tags; 
     61      } 
     62      if (urlPart.fixable) { 
     63        this._params.fixable = urlPart.fixable; 
     64      } else { 
     65        delete this._params.fixable; 
     66      } 
    5167      this._params.bbox = this._map.getBounds().toBBoxString(); 
    5268      this._params.zoom = this._map.getZoom(); 
  • static/map/Osmose.Menu.js

    re50254d r800e4b1  
    141141  }, 
    142142 
    143   _itemChanged: function () { 
    144     this._urlPart = this._buildUrlPart(); 
     143  _itemChanged: function (skipBuildUrl = false) { 
     144    if (!skipBuildUrl) { 
     145      this._urlPart = this._buildUrlPart(); 
     146    } 
    145147    this.fire('itemchanged', { 
    146148      urlPart: this._urlPart 
     
    205207 
    206208    this._countItemAll(); 
    207     this._itemChanged(); 
     209    this._urlPart = {}; 
     210    if (items) { 
     211        this._urlPart.item =  items; 
     212    } 
     213    if (levels) { 
     214      this._urlPart.level = levels; 
     215    } 
     216    if (tags) { 
     217      this._urlPart.tags = tags; 
     218    } 
     219    if (fixable) { 
     220      this._urlPart.fixable = fixable; 
     221    }; 
     222    this._itemChanged(true); 
    208223  }, 
    209224}); 
Note: See TracChangeset for help on using the changeset viewer.