Carry out the following steps:
- Create the openlayers.html file and add the <head> and <body> tags. In the <head> tag, import the OpenLayers JavaScript library by executing the following code:
<!doctype html> <html> <head> <title>OpenLayers Example</title> <script src="http://openlayers.org/api/OpenLayers.js"> </script> </head> <body> </body> </html>
- First, add a <div> element in the <body> tag that will contain the OpenLayers map. The map should be given a width of 900 pixels and a height of 500 pixels, using the following code:
<div style="width:900px; height:500px" id="map"></div>
- Just after the map is placed in <div>, add a JavaScript script and create an OpenLayers map object. In the map constructor parameters, ...