Hi,
I am adding the markers to map from client side using the below code
var marker = new OpenLayers.Marker(new OpenLayers.LonLat(lon,lat), icon);
markers.addMarker(marker);
Just i want to know how can i get the markers within a circle when i draw a circle on client side especially.
i know it can be possible by the event "Map1ClientDrawEnd()" .So i am using below code to achieve this.
function Map1ClientDrawEnd() {
var map = Map1.GetOpenlayersMap();
var editOverlay = map.getLayer("EditOverlay");
var markerlayer=map.getLayer("Markers");
for(var i=0;i<markerlayer.marker.length;i++)
{
for (var feature in editOverlay.features)
{
PolygonShape polygonShape = (PolygonShape)feature.GetShape();
Boolean b=markerlayer.marker.isWithin(polygonShape);
if(b)
{
alert("k");
}
}
}
can you please provide me the right way to implement this.If you provide some sample it would be more appreciable.
If you need any further information please let me know.
Thanks & Regards,
Chandramohan.