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

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - CFRelease causing crash in iPad application -