Follow these steps to start manipulating the default controls:
Create an HTML page using the usual template referring to the OpenLayers 3 JavaScript library and its default CSS, as shown here:
<!doctype html> <html> <head> <title>Default controls</title> <link rel="stylesheet" href="../assets/ol3/css/ol.css" type="text/css"> <link rel="stylesheet" href="../assets/css/samples.css" type="text/css" /> </head> <body> <div id="map" class="map"></div> <script src="../assets/ol3/ol.js"></script> <script> </script> </body> </html>
Now, between the empty
<script>
</script>
add the declaration to the map:var osm_default = new ol.layer.Tile({ source: new ol.source.OSM() }); var map = new ol.Map({ layers: [osm_default], target: 'map', view: new ol.View({ center: ol.proj.transform([-1.81185...