I have multiple asset icons on a map
I want to be able to zoom to show all icons on the map
I have the Lat and Long of each asset
Currently, i have it working with 1 asset as I can use this code to zoom to the asset
map.setCenter(new OpenLayers.LonLat(obj.d[k].vLongitude, obj.d[k].vLatitude).transform(WGS84, map.getProjectionObject()), map.getZoom());
Do I need to pass in an array of co-ordinates?
Best Answer
create coordinate list
create a markers layer
and add all markers on map
and
zoom to data extent