Category "geojson"

d3.js geo projection renders a black box

I am trying to make a US map using d3.js. I use the following code to draw my map: const EDUCATION = 'https://raw.githubusercontent.com/no-stack-dub-sack/test

Calculate centroid of entire GeoDataFrame of points

I would like to import some waypoints/markers from a geojson file. Then determine the centroid of all of the points. My code calculates the centroid of each poi

Geospatial 2dsphere index not creating in MongoDB Atlas and manually

I am trying to create a 2sphere index in my mongodb collection. The index needs to be on location field which is at GeoJSON format: location: { coordinat

How to drag a polygon in mapbox-gl-js?

I have a map with multiple polygons. The polygons need to move/update on user click/drag. The functionality I want is the same as this example: https://www.mapb

How can I assign the contents of a geojson file to a variable in Javascript?

The code shown already works, but I want to clean it up. It declares a variable called placez which contains information in geojson format for the next part of

How to get features from vector layer in Openlayers 3

I am trying to get the features from my vector layer. The vector layer is composed from a GeoJSON document loaded via Geoserver. I tried vector.features but in

Dynamically generate source data for Mapbox-GL layer

We are currently building an asset tracking widget using Mapbox-GL. When zoomed in, we show the actual assets, and this works fine. But, when zooming out, we wo

Leaflet: How to create a group layer that shows all other layers?

I created the following script but it won't show both layers. If i delete the single groups ("commerciele parkeerplaatsen" and "rodents") and only leave the "bo

Folium / Black colored countries

I am trying to visualize some Covid-19 data (Covid Cases Ratio per Country) using folium module. For some reason a few countries appear to be black on the map,