[OpenLayers-Users] problem with re positioning of icons after zoom in and zoom out.

Vinay BM vinay1059 at rediffmail.com
Tue Aug 3 04:32:29 EDT 2010


Hello All,

I have some problem with re positioning of icons on different layers.

I have added 2 layers and 3 icon layers to the main base layer.
after performing zoom in and zoom out operation for nearly 2 to 3 times. the icons are changing it's position. once i refresh, the icons would be in a original place.

here is the code 

var extent = new OpenLayers.Bounds(10, -90, 60, 90);
	
	var bigZoom = new OpenLayers.Control.PanZoomBar();
	var smallZoom = new OpenLayers.Control.PanZoom();
	
	map = new OpenLayers.Map(elementId, { 
		controls: [
			new OpenLayers.Control.Navigation(), 
			bigZoom, 
			smallZoom,
			new OpenLayers.Control.OverviewMap()],
			restrictedExtent : extent
	});
	

	map.zoomControl = {
		big: bigZoom,
		small: smallZoom
	};
	
	addBaseLayer();
	addPhysicalLinkLayer();
	addLayer("CONTAINERs", contextPath + "/images/ne_SISA_graphical32.gif");
	addLayer("NEs", contextPath + "/images/netypes/" + "${neType}" + "_white32.png");
	addIconLayer('alarms' , '/images/alarms/' + '${severity}' + '16.gif' , -25 , -21);
	addIconLayer('maintanence' , '/images/maintanence/' + '${severity}' + '16.gif' ,-25 , 0);
	addIconLayer('communicationstate' , '/images/communicationstate/' + '${severity}' + '16.gif' , 12 , 0);
	addDragFeature();
	addSelectFeature();
	
	updateMapControls();
	
	map.zoomToExtent(extent);
	map.setCenter(new OpenLayers.LonLat(70,78.74603), 2);
	
	map.attributes = [];
	map.dragging = false;
	map.lastToolTipEvent = null;
	map.toolTipDelay = 1000;
	map.toolTipVisibilityTime = 5000;
		

please suggest your opinion.

Thank you and Regards,
Vinay.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100803/85721701/attachment.html


More information about the Users mailing list