Is there a way to embed/mashup the OpenStreetMap in your page (like the way Google Maps API works)?

I need to show a map inside my page with some markers and allow dragging/zooming around, maybe routing. I suspect there would be some Javascript API for this, but I can't seem to find it.

Searching gets me an API for access to raw map data , but that seems to be more for map editing; besides, working with that would be a heavy task for AJAX.

asked 20 Sep, 13:34

dexter's gravatar image

dexter
1914
accept rate: 0%

edited 20 Sep, 18:01

Spiekerooger's gravatar image

Spiekerooger
2.5k12048


Hi!

Javacript packages like Leaflet and MapLibre allow you to create web maps really easily. If you check out their docs they'll give you a bunch of examples displaying Open Street Map! The first page on Leaflet shows you how to display an OSM map and add a marker.

permanent link

answered 20 Sep, 13:41

danhirst's gravatar image

danhirst
16
accept rate: 0%

edited 20 Sep, 13:43

UMap and facilmap can do that.

Search this site if you need more details, this question has been answered many times...

permanent link

answered 20 Sep, 17:50

H_mlet's gravatar image

H_mlet
4.7k1573
accept rate: 13%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×1

question asked: 20 Sep, 13:34

question was seen: 133 times

last updated: 20 Sep, 18:01

Related questions

powered by OSQA