Strictly speaking this is not a topic for the dev list, I believe. However, have you tried to look at the maxExtent property in the OL Map class? If you just google for max extent or go to the OL examples pages you should find plenty of answers.<div>
<br clear="all">Tim-Hinnerk Heuer<br><br>Twitter: @geekdenz<br><div>Blog: <a href="http://www.thheuer.com/" target="_blank">http://www.thheuer.com</a></div><br>
<br><br><div class="gmail_quote">On Wed, May 9, 2012 at 6:41 PM, ismet bahadir <span dir="ltr"><<a href="mailto:ismetbahadir@gmail.com" target="_blank">ismetbahadir@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
hello all,<br><br>i am trying to display only a restricted (defined by me) part of the map i have and i do not want the user to see any other location. i tried to examine maxExtent and bbox but failed to make my code work. <br>
<br>in detail, i want to give my long-lat values (say, 26-45 lon; 36-42 lat), limit the display only to this rectangle and avoid the user to display other places fall apart of this rectangle. <br><br>kind regards,<br><br>
- ismet<br>
<br>_______________________________________________<br>
Dev mailing list<br>
<a href="mailto:Dev@lists.osgeo.org">Dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-dev</a><br>
<br></blockquote></div><br></div>