跳轉到

Getting started with OpenLayers⚓︎

Introduction⚓︎

OpenLayers is a complete JavaScript library for embedding maps. It uses a permissive BSD open-source license so can be incorporated into any site without legal worries. Its source code is available on GitHub.

Getting started⚓︎

A map deployment example using the OpenLayers library is detailed in the Quick Start section of the OpenLayers documentation. It requires a bit of effort to install the node.js framework and install the library, so we won't go into that here.

You want to …

  • use a different background? → Openlayers natively supports TMS and WMS . See Openlayers official examples and the API to see which options are supported.
  • add all of your company's locations? → Provide them as GeoJSON and include them in the map.
  • use a different map projection? → OpenLayers support all Proj4 projections as long as you include proj4js JavaScript library. Moreover, client-side raster reprojection is supported, so you can use OpenStreetMap tiles in your local projection.