google maps

Google Maps is an excellent alternative to display user maps, which offers high performance and ease of integration. However, some websites run into a problem when they exceed certain map usage thresholds, after which Google Maps requires a license fee.

That is where the integration with OpenStreetMaps begins to be an interesting alternative, since it is an open map database, created by the community, such as Wikipedia.

OpenStreetMaps does not offer the same cartography in the same detail or update, but it does offer enough for many businesses and websites. But the fundamental difference is that the maps are free. However, it requires more integration work, since they leave us some important tasks such as:

  • Get the map tile database
  • Integrate a Javascript API to move the tiles

map tiles

When you integrate Google Maps, the map tiles are downloaded by your users directly from Google’s servers. However, in OpenStreetMaps, being a non-profit organization it doesn’t have as much muscle to offer tile download, so you have to get the tile database and host it on your own website.

There are services that offer to download the map tiles, but they may charge you for the use.

Javascript APIs

In addition, you will need to integrate a Javascript API that allows users to view the maps and download tiles as they move through them.

There are Javascript libraries that you can download to achieve this behavior easily. The two recommended ones are OpenLayers and Leaflet, the latter being lighter and easier to learn.

On the site you will find help to start integrating Open Street Maps.

Loading Facebook Comments ...
Loading Disqus Comments ...