Skip to content
Advertisement

Tag: leaflet

How I can send data from Flask to JavaScript?

Hello I am new and building an application in Flask and Javascript. I have a problem with sending data from Flask do JavaScript. I have code in routes.py I want to send jsonify(slownik) to my code in JavaScript but I dont want to do it with render_template bacause it refresh a page and I need this data to display it

How to fix error “Failed to compile : ./node_modules/@react-leaflet/core/esm/path.js 10:41 Module parse failed: Unexpected token (10:41)”

I am trying to create a react-typescript app along with leaflet. I used the command, npm install leaflet react-leaflet @types/react @types/leaflet –save to install the dependencies. But when I start the application it says, Here’s my package.json Here’s map/index.tsx I tried reinstalling dependencies several times but still didn’t work. I understand this is a simple issue and an error that

Leaflet createTile await for image to load

I am using the createTile with Vue2Leaflet library to make custom tiles. As far as I saw in the documentation, the function runs as many times as there are coords on the map. In my case, the function is triggered way more times than I have images to return so at the end I get 90%+ empty tiles that just

React leaflet map center not changing

I’m setting up a map to find the coords of a person and then put that location on the map. But for some reason, the coords aren’t being shown on the map. I console.log to make sure the state variables(where the coords are being stored) were emitting the right coords and they are. I don’t know why the map won’t

Advertisement