[OpenLayers-Users] multiple Markers?????
Prasad Choudhary
prasad.choudhary at gmail.com
Thu Aug 30 02:24:43 EDT 2007
Hello List,
I want to render the base map with miltiple markers for that the code i put
is like
<code>
putMakers = function(){
var size = new OpenLayers.Size(12,20);
var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
icon = new OpenLayers.Icon('../img/marker_20_blue.png',size,offset);
markerArray = new Array(myData.length);
for(var i=0; i< myData.length; i++)
{
locLonLat = new OpenLayers.LonLat(myData[i][1],myData[i][0]);
markerArray[i] = new OpenLayers.Marker(locLonLat,icon);
markerLayer.addMarker(markerArray[i]);
}
}
</code>
Markers are creating but vanishing and I am able to see only last marker
location only
can any one tell me why it is so????
is there any other better solution for this!!
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070830/6089410a/attachment.html
More information about the Users
mailing list