I am encountering an issue in my Next.js app while trying to display multiple locations on a leaflet map using a GeoJSON data file. Everything works fine when I have just one location displayed on the map, but as soon as I import additional data and attemp ...
I need to combine multiple JSON objects into a GeoJSON feature collection with LineStrings Here are some example poorly formatted JSON objects: {"lat":16.0269337,"lon":40.073042,"score":1,"ID":"13800006252028","TYPES":"Regional","N2C":"2","NAME":"Strada ...
Currently, I am in the process of reading a JSON file and formatting it for GeoJSON function getAddress(id,search,vagas, next) { geo.geocode({address:search}, function (results,status) { if (status == google.maps.GeocoderStatus.OK) { ...
I've been given a task to develop a PHP routine that will extract the ISO code and name from a geojson file for use in a dropdown list of countries on a website. This is completely new to me and I'm finding it difficult to understand the documentation. I ...
I am currently working on a map project where I am drawing polygons with properties pulled from a JSON file. Each polygon is colored based on feature values in the JSON file. Here's an example of a feature in the JSON file: { "type": "Feature", " ...
In my GEOSwift implementation, I have a feature structured like this: { "type" : "Feature", "geometry" : { "type" : "Point", "coordinates" : [ -xx.xxxxxxxxxxxxxxx, xx.xxxxx ...
My mongodb collection had a specific schema, but I recently made an update to include lat/lon coordinates. Original version: var schema = mongoose.Schema({ id: String, name: String, address: String, city: String, zip: String, coun ...
Currently, I have created a custom .geo.json file from a county shapefile using ogr2ogr. My goal is to manually add values for each county. After studying a jsfiddle example (link provided), I'm unsure how to merge the two together. The specific line ...
I included this vector into my local host code, but the JSON file does not seem to load. geojson_layer = new OpenLayers.Layer.Vector("features", { projection: epsg4326, strategies: [new OpenLayers.Strategy.Fixed()], pro ...
I am currently working on developing a map using floor plans stored in mongodb. Instead of saving the JSON data into a file and calling it with map.data.loadGeoJson('myfile.json'), I want to create an object directly for better efficiency. Below ...
Utilizing the Google map label tool, I am trying to showcase certain property from GeoJSON data on a GeoJSON layer. However, the issue arises as the layer has a dark color and the label is appearing blurry behind the GeoJSON data layer. Despite attempting ...
Lately, I've been delving into the world of leaflets and exploring various plugins. Some of the plugins I've come across (like Leaflet.markercluster) utilize JSON to map out points. However, instead of directly using the JSON stream or a JSON fi ...
I am looking for a way to efficiently draw multiple geo points using Leaflet and HTML5 canvas. My data source is geoJSON, but according to the documentation of Leaflet, drawing geo positions as canvas is currently not supported. var anotherGeojsonLayer = ...
I am currently working on fetching JSON data from an API call, extracting the latitude, longitude, and name variables to create a GeoJSON array, and then displaying it on a Leaflet map. Despite not encountering any errors in the console, the geojson appea ...
I've come to a point where I've exhausted all my Google searches and now asking for help here. Currently, we are processing a KML file using geoXml3 on the client side. However, ideally, I would like to preprocess it on the server side and then send the po ...
Currently, I am dealing with a GeoJSON file that has the following structure: [ { "geometry": { "type": "Point", "coordinates": [ 35.109876, 32.711323 ] }, ...
While working with Leaflet JavaScript, I am attempting to retrieve data directly from GeoServer using an Ajax link. To display it nicely in a DataTables table, I need to convert it into JSON format as per DataTables instructions. However, I keep encounteri ...
I'm currently utilizing the leaflet-ajax project (https://github.com/calvinmetcalf/leaflet-ajax) and my objective is to define a geojsonLayer variable in the following manner: var geojsonLayer = L.geoJson.ajax("http://localhost:7070/findInArea"); The end ...
I've been experimenting with the npm package circle-to-polygon and I crafted the following code to generate a polygon that resembles a circle. const circleToPolygon = require('circle-to-polygon'); let coordinates = [28.612484207825005, 77.23574939044147] ...
Currently, I am attempting to utilize the Shpjs package in order to import a Shape file onto a Leaflet map. According to the Shpjs documentation: shpjs Below is the code snippet I am working with: const [geoData, setGeoData] = useState(null); //stat ...
I need help sorting a GeoJSON file based on a property and then slicing it to keep only the top 5 features. For instance, I want to take this GeoJSON and arrange it in descending order by the incidents property: ... [ -75.1972382872565 ...
After setting the return to null for the component and condition in question to check the data being returned, I thoroughly examined the coordinates arrays without finding any issues. The data comes in as an array of geometry collections containing linest ...