Harry Wood
home
>
maps
>
examples
> openlayers >
OpenLayers Simplest
OpenLayers Simplest
The most basic OpenLayers example. Just a map zoomed to the whole world.
<!DOCTYPE HTML> <head> <title>OpenLayers Simplest Example</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.11/lib/OpenLayers.js"></script> </head> <body> <div id="map" style="height:250px"></div> <script> map = new OpenLayers.Map("map"); map.addLayer(new OpenLayers.Layer.OSM()); map.zoomToMaxExtent(); </script> </body>
view directly
Home
Blog
About
Maps
Other
Contact