The parameter is actually restrictedExtent.

Hope this helps.

Jerome A. Wendell


-----Original Message-----
From: Users [mailto:openlayers-users-boun...@lists.osgeo.org] On Behalf Of 
adityakumar529
Sent: Sunday, November 29, 2015 1:17 PM
To: openlayers-users@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
us...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users

_______________________________________________
Users mailing list
us...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to