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

OSM not working on live server

0

My site uses OSM to display a town border with layers to represent differing entities on the map. Everything work great on my local WAMP system but not on the main server. This is the URL for the problem page... MSHolmes Town Article.

There are no errors thrown in the console. Any clues as to the solution of the problem are greatly appreciated.

jdadwilson

asked 11 Dec '22, 02:30

jdadwilson's gravatar image

jdadwilson
11223
accept rate: 0%

Without the source code of the site I suspect that anyone would be guessing.

This seems to be related to this forum thread.

(11 Dec '22, 03:32) SomeoneElse ♦

One Answer:

1

You need to give your Leaflet (map) div a height.

This is the map_canvas_xl element. At present it doesn't have a height set on it so the map won't display.

If you use CSS to assign it (for example) height: 500px then the map shows up.

answered 12 Dec '22, 08:59

Richard's gravatar image

Richard ♦
30.9k44279412
accept rate: 18%

Thanks... now working.

(12 Dec '22, 17:02) jdadwilson

Source code available on GitHub .