This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

search line

0

Hello everyone. I figured out how to embed a map on my site (via HTML). But the map is inserted without a search bar http://joxi.ru/BA0Xn5aC1GDa5A . Can you tell me how to add a search bar? where can i find documentation?

asked 10 Feb '22, 13:48

%D0%9F%D0%B5%D1%82%D1%801245's gravatar image

Петр1245
11112
accept rate: 0%

edited 10 Feb '22, 13:50


One Answer:

2

Hi.

Unfortunately the iframe code from opentreetmap.org is only meant to display a simple map, optionally with a single marker. Here is the doc.

I'm afraid you'll need to write your own code, using the Leaflet js framework for example.

Or I think you can use facilmap, based on OSM data. Here some code that looks like what you want.

Regards.

answered 10 Feb '22, 19:16

H_mlet's gravatar image

H_mlet
5.4k1781
accept rate: 13%

Source code available on GitHub .