EN DE
  • Sign up
  • Log in

Example with OpenLayers (EPSG:3857) with grayscale map

Map

Code

<!DOCTYPE html>
<html>
  <head>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/OpenLayers.js' type='text/javascript'></script>
    <style type="text/css">#map .olControlAttribution {bottom: 5px}</style>
    <script type='text/javascript'>
      function initMap() {
        var apiKey = 'your-api-key';
        var host = 'https://maps.omniscale.net/v2/' + apiKey + '/style.grayscale/${z}/${x}/${y}.png';


        var attribution = '&copy; 2023 &middot; <a href="https://maps.omniscale.com/">Omniscale</a> ' +
            '&middot; Map data: <a href="https://www.openstreetmap.org/copyright">OpenStreetMap  (Lizenz: ODbL)</a>';

        var layer = new OpenLayers.Layer.XYZ("TMS", host, {attribution: attribution});

        var map = new OpenLayers.Map('map', {
          center: new OpenLayers.LonLat(915046, 7008963),
          zoom: 13,
          layers: [layer],
          projection: new OpenLayers.Projection('EPSG:3857')
        });
      };
    </script>
  </head>
  <body onload='initMap()'>
    <div id='map' style='height: 400px; width: 400px;'></div>
  </body>
</html>

Help and Service

  • Register • Login
  • Interactive map
  • Plans and Pricing

Help and Service

  • Help/API
  • Available projections

About us

  • Imprint
  • Terms and Conditions
  • Privacy

Contact details

Omniscale GmbH & Co. KG
Moltkestraße 6a
26122 Oldenburg
Germany
Go to contact form ↝

Copyright © 2023 • Omniscale, Map data: OpenStreetMap (License: ODbL)

This offer only applies to tradesmen. All indicated prices are listed without VAT.

This offer only applies to tradesmen. All indicated prices are listed without VAT.