Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

kiasaty's avatar

conflict between app.js and leaflet causes a grey screen instead of map

Hi, this problem is making me crazy...

I use OpenStreetMap and leaflet to show a map in a form, in order to get the user's coordinates. but it only shows a blank grey screen.

when I delete app.js script tag from the page, it works fine and the map shows up.

I have searched a lot to solve this problem, but nothing.

I really appreciate it guys if you take a look at it: https://niki24.ir/donators/register

I have done the getting started guide in the following URL: https://switch2osm.org/using-tiles/getting-started-with-leaflet/

0 likes
1 reply
kiasaty's avatar

when I delete 'defer' form app.js script tag, it works fine.

but It's not good for SEO, How can I fix this?

Please or to participate in this conversation.