Hi, I need to create a static map with a marker on my web site and dynamic one with multiple markers and zoom/drag/put/remove marker capabilities. Is it necessary to use any third party services to implement OSM with all these functions on my website?
I would really appreciate your help. Thank you in advance! Looking forward to hearing from you. Best, Nikita Related Question: https://help.openstreetmap.org/questions/64437/is-there-a-request-limit-for-static-maps? asked 29 Jun '18, 16:22 Nikita_And |
You can implement a dynamic ("slippy") map using a suitable Javascript library like Leaflet or OpenLayers without any third-party services. OpenStreetMap does not offer a static map feature, so you will have to employ a third-party service for that, or host a static map yourself (some disk space and PHP required, but Open Source implementations exist). Simple static map implementations are based on downloading tiles, so you'll still depend on OpenStreetMap tiles. If you plan to make a lot of requests, you should consider producing your own tiles or paying someone for producing these tiles, so as not to overload the donation and volunteer operated OpenStreetMap infrastructure - especially if you are using OSM in a commercial context. "A million requests per month" qualifies as "a lot". The web site switch2osm.org explains how to set up your own tile server. answered 29 Jun '18, 16:45 Frederik Ramm ♦ Thank you so much for the quick answer! Could you please tell me, does it mean that Leaflet.js and OpenStreetMaps are completely free? Do they have any request limits? Does it mean I can host a dynamic("slippy") map on my website with unlimited number of request? Thank you!
(29 Jun '18, 17:02)
Nikita_And
2
Leaflet and OpenLayers are just JavaScript libraries. You can download them and put the files in your web directory and never access a remote server again. They don't have request limits because they are just the code that displays tiles. The request limits come from the servers that provide tiles. If you produce the tiles yourself, with your own tile server, set up using open source software as outlined on switch2osm.org, then you can make as many requests as your server can handle. Only if you use servers run by other people will there be limits on how much you can use them.
(29 Jun '18, 17:15)
Frederik Ramm ♦
I've not tried it, but in Leaflet there may be a way to disable all the zooming features. If you set the panning boundaries to the size of your map's frame it should effectively make it static.
(04 Jul '18, 23:11)
DaveF
|