javascript - Reset all my markerLayer in Mapbox -


i use mapbox map show company geoloc on, code is

var markerlayer = l.mapbox.markerlayer({     type: 'feature',     geometry: {     type: 'point',         coordinates: [value.geolng, value.geolat]     },     properties: {         title: 'a single marker',         description: 'just 1 of me',     } }).addto( $.mapbox.mapobj ); 

my problem when new json call , return new locations did don't know how can reset/remove old markerlayer , add new map.

i have create map obj. width jquery $.mapbox.mapobj hobe posible reset/remove markerlayers object , soe can add new markerlayers on it.

you can reset marker layers with

markerlayer.clearlayers() 

Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -