[OpenLayers-Users] Restrictmap is not working

Jerome A. Wendell jawendell at suddenlink.net
Sun Nov 29 13:27:40 PST 2015


The parameter is actually restrictedExtent.

Hope this helps.

Jerome A. Wendell


-----Original Message-----
From: Users [mailto:openlayers-users-bounces at lists.osgeo.org] On Behalf Of adityakumar529
Sent: Sunday, November 29, 2015 1:17 PM
To: openlayers-users at lists.osgeo.org
Subject: [OpenLayers-Users] Restrictmap is not working

Hi Users,


function init()
	{
	map =new OpenLayers.Map({
			div: "map",
			projection: new OpenLayers.Projection("EPSG:4326"),
			 maxExtent: new OpenLayers.Bounds(77.32,12.66,77.81,73.23),
			restrictExtent: new OpenLayers.Bounds(77.32,12.66,77.81,73.23)
		});
				
		var gmap = new OpenLayers.Layer.Google(
        "Google Streets", // the default
        {numZoomLevels: 20, visibility: false}
    );
		var osm =new OpenLayers.Layer.Google(
        "Google Hybrid",
        {type: google.maps.MapTypeId.HYBRID, numZoomLevels: 20, visibility:
false}
    );
		
		  var googlemap = new OpenLayers.Layer.OSM();
		
		map.addLayers([osm,gmap,googlemap]);
		


Following is the code I have used but I am not restrict my map.

Any idea how to fix it?

Aditya Kumar


		
		  
			
	
	
	
	
	
		  



-----
GIS Developer

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Restrictmap-is-not-working-tp5239041.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users



More information about the Users mailing list