As being new to web site development, I have been able to display map on my website, but I want that I should only zoom to some specific places of India on loading of web pages.
Can somebody please suggest on how to go about it.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Web Urban Atlas</title>
<link type= text/css rel = stylesheet href="urban_stylesheet.css" />
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<script type="text/javascript" src="http://openlayers.org/api/2.11/OpenLayers.js"></script>
<style>
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
</style>
<!-- The magic comes here -->
<script type="text/javascript">
function init() {
// Create the map using the specified
// DOM element
var map = new OpenLayers.Map("rcp1_map");
// Create an OpenStreeMap raster layer
// and add to the map
var osm = new OpenLayers.Layer.OSM();
map.addLayer(osm);
// Set view to zoom maximum map extent
map.zoomToMaxExtent();
}
</script>
<script>
$(function() {
$( "#accordion" ).accordion();
});
</script>
</head>
<body onload="init()">
<div id="header" style= "width: 100%;height:20%;">
<h2>Urban Atlas</h2>
</div>
<div id="rcp1_map" style= "width:80%;height:60%;float:right;">
</div>
<div id="accordion" style="width:20%">
<h3>Bangalore</h3>
<div><p>Bangalore is city of gardens</p></div>
<h3>delhi</h3>
<div><p>Content for Delhi</p></div>
<h3>mumbai</h3>
<div><p>Content for Mumbai</p></div>
</div>
</body>
</html>