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

How to highlight country borders in HTML map embed

0

When I type a name of a country in Open street Maps it shows this country with highlighted borders, here is an example screenshot: http://prntscr.com/qrvwlg

But when I use HTML embed it never shows the country borders. I only have the option to place a marker on the map and change the layers, but it never shows the country border.

Please help me if you can

asked 23 Jan '20, 16:58

Nexuso's gravatar image

Nexuso
11112
accept rate: 0%


One Answer:

0

You should try using overpass-turbo.

This request will load the "Belgium" relation, I've used wikidata keyword, but others will work.

And there's an Export - Map - interactive Map function, that generate a link that you will be able to embed properly, see this link. The URL is quite ugly as the overpass query is encoded in it, but the result is quite similar to your screenshot !

If you don't really need interactivity, you should just export an image, it will be nicer on the servers.

Overpass is great, and overpass-turbo is just awesome.

If you need a lot of customization, uMap will be the next step. You can use it to render overpass queries, with a lot of options.

answered 27 Jan '20, 01:33

H_mlet's gravatar image

H_mlet
5.4k1781
accept rate: 13%

edited 27 Jan '20, 01:33

Source code available on GitHub .