Harry Wood
home
>
maps
>
examples
> mapstraction >
Mapstraction Simple OpenLayers
Mapstraction Simple OpenLayers
Using Mapstraction to invoke OpenLayers, which defaults to the OpenStreetMap tile server (first example in
the mapstraction tutorial
)
<html> <head> <title>Mapstraction Simple OpenLayers Example</title> <script src="http://openlayers.org/api/OpenLayers.js"></script> <script src="https://raw.github.com/mapstraction/mxn/master/source/mxn.js?(openlayers)" type="text/javascript"></script> <style type="text/css"> #map { height: 200px; } </style> </head> <body> <div id="map"></div> <script type="text/javascript"> var map = new mxn.Mapstraction('map', 'openlayers'); var latlon = new mxn.LatLonPoint(51.50733, -0.12769); map.setCenterAndZoom(latlon, 10); </script> <p>Don't forget the credits:<br> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors</p> </body> </html>
view directly
Home
Blog
About
Maps
Other
Contact