Skip to main content

All Questions

0 votes
2 answers
575 views

How to reset coordinates into an Ajax call after having initialized a map?

I inserted a map on my webpage by using the Leaflet library. What I want to do is to show a map zoomed on a specific region according to which city the user types into a text field. I firstly ...
franz1's user avatar
  • 341
3 votes
1 answer
8k views

Draw country border on leaflet map using JSON coordinates

I have a leaflet map, and I have a set of country borders in a long JSON file. I am trying to use the JSON coordinates to draw a solid green border along the border of a country displayed in the map ...
Morgan Janjua Crane's user avatar
2 votes
3 answers
4k views

How read a json file with coordinate and plot them in a map?

I've a json file like: [ { "coordinate": [45.464743, 9.189135799999999], "Indirizzo": "Bike Sharing P.za Duomo Milano" }, { "coordinate": [45.4664299, 9.1976032], "Indirizzo": "...
AliceG's user avatar
  • 83
0 votes
1 answer
491 views

Leaflet: sort and edit geojson data in a table with if-statements

I'm having trouble with displaying JSON data in a table. I am working on a map that shows data which is directly exported as a geojson file from Openstreetmap via overpass-turbo.eu. This means that ...
Stefan's user avatar
  • 69
0 votes
1 answer
878 views

get json data from a ajax request

I am pretty new to JSON and ajax and don't know, how to get the JSON data from my request? At the moment I have got two forms. One is for the search(a address) and the other one is for validating the ...
c00L's user avatar
  • 609
0 votes
1 answer
2k views

Leaflet. How I can get JSON marker property by Latitude and Longitude?

I have my custom 'latitude' and 'longitude' variable. var custom_loc = [50.34434, 63.23442] And also I have JSON data with points in GeoJSON format. { "type": "Feature", "geometry": { "...
T.Abdullaev's user avatar
1 vote
2 answers
717 views

How to retrieve a variable with coordinates from a JSON object

I'm trying to GET an object with a name and a location property. I need the coordinates of the location property to create a marker at that location. Running this code however results in Uncaught ...
RobVH's user avatar
  • 95
2 votes
0 answers
430 views

How do you update leaflet marker position every 2 seconds using getJSON response?

I'm building a get user location on a JSON file every 2 seconds on a JSON response, I tried this code below but the marker is not showing. locate(); var map = L.map('map', {scrollWheelZoom:true})....
Cross's user avatar
  • 75