geojson

Get property from geojson inside polygon using google maps js

僤鯓⒐⒋嵵緔 提交于 2020-01-05 00:50:54
问题 How can I access property of geojson data inside drawn polygon?I have this example: var map; function initMap() { map = new google.maps.Map(document.getElementById('map'), { zoom: 4, center: {lat: -28, lng: 137} }); // Load GeoJSON. map.data.loadGeoJson('https://storage.googleapis.com/mapsdevsite/json/google.json'); // Set the stroke width, and fill color for each polygon map.data.setStyle({ fillColor: 'green', strokeWeight: 1 }); var drawingManager = new google.maps.drawing.DrawingManager({

MongoDB GeoJSON “Can't extract geo keys from object, malformed geometry?” when inserting type Polygon

妖精的绣舞 提交于 2020-01-04 16:41:09
问题 I'm getting the error "Can't extract geo keys from object, malformed geometry?". The polygon is closed and the format looks good, as it is inserting correctly into Mongo. I'm using Mongo version 2.6.3, running on Centos 6.5 x64. What is wrong with the Polygon below? I followed the Mongo examples quite closely. db.test.remove({}); db.test.insert({testPoly: {type: "Polygon", coordinates: [[0,0],[0,20],[10,30],[20,20],[20,0],[0,0]]}}); db.test.ensureIndex({testPoly: "2dsphere" }); db.test.find()

Mongodb geolocation boundaries search/query

痴心易碎 提交于 2020-01-04 15:27:29
问题 I have a documents contains list of location "boxes" (square area). Each box is represented by 2 points (bottom-left or south-west, top-right or north-east). Document, for example: { locations: [ [[bottom,left],[top,right]], [[bottom,left],[top,right]], [[bottom,left],[top,right]] ] } I'm using 2d index for those boundaries points. My input is a specific location point [x,y] and I want to fetch all documents that have at list one box that this point is located in it. Is there any geospatial

Mongodb geolocation boundaries search/query

会有一股神秘感。 提交于 2020-01-04 15:27:28
问题 I have a documents contains list of location "boxes" (square area). Each box is represented by 2 points (bottom-left or south-west, top-right or north-east). Document, for example: { locations: [ [[bottom,left],[top,right]], [[bottom,left],[top,right]], [[bottom,left],[top,right]] ] } I'm using 2d index for those boundaries points. My input is a specific location point [x,y] and I want to fetch all documents that have at list one box that this point is located in it. Is there any geospatial

Leaflet : ordering GeoJSON elements inside a layer

倖福魔咒の 提交于 2020-01-04 08:26:10
问题 I'm displaying a GeoJSON layer using leaflet, with the pointToLayer function. Everything works ok so far. But I would like to display my points in a certain order, based on a property of the GeoJSON. This is important because the radiuses of my points varies with this property, and I need to display the smaller circles on top. I hope I make myself clear. I've tried many things, but here's what I think is my best try : var pointLayer = L.geoJson(centroids, { pointToLayer: function (feature,

Leaflet GeoJSON points *behind* polygon

我是研究僧i 提交于 2020-01-04 02:17:10
问题 I have two leaflet geojson layers - they both have Point and Polygon features. I would like to be able to order them on the map, but when I do that today (attempting to order them by adding them in a certain order, using bringToBack/bringToFront, etc) the Point icons from both layers sit on top of all polygons. The reason (from my limited experience) appears to be that they're drawn on a completely different pane in the map. I'd very much like to have the points from a layer drawn on the same

how to access multipolygon coordinates in mysql

。_饼干妹妹 提交于 2020-01-03 21:08:49
问题 Could you please help me to find the right solution how to access to the individual points of multi-polygon object in mysql? Here is the object: "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [-105.00432014465332, 39.74732195489861], [-105.00715255737305, 39.74620006835170], [-105.00921249389647, 39.74468219277038], [-105.01067161560059, 39.74362625960105], [-105.01195907592773, 39.74290029616054], [-105.00989913940431, 39.74078835902781], [-105.00758171081543, 39.74059036160317],

how to access multipolygon coordinates in mysql

淺唱寂寞╮ 提交于 2020-01-03 21:08:31
问题 Could you please help me to find the right solution how to access to the individual points of multi-polygon object in mysql? Here is the object: "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [-105.00432014465332, 39.74732195489861], [-105.00715255737305, 39.74620006835170], [-105.00921249389647, 39.74468219277038], [-105.01067161560059, 39.74362625960105], [-105.01195907592773, 39.74290029616054], [-105.00989913940431, 39.74078835902781], [-105.00758171081543, 39.74059036160317],

d3js force layout on a map

佐手、 提交于 2020-01-03 19:07:22
问题 I'm trying to place a force layout node system on a map. SOME of the nodes have lon and lat values in the json file I'm using. Other nodes only need to be connected but not georeferenced. I would like to place in position the nodes which have lon and lat values and the others simply to be connected. (I found this example which I followed but the nodes without lon and lat values are placed outside the svg: https://bl.ocks.org/cmgiven/4cfa1a95f9b952622280a90138842b79) I also tried to filter the

Show different pop-ups for different polygons in a GeoJSON [Folium] [Python] [Map]

假装没事ソ 提交于 2020-01-03 02:59:05
问题 I am using folium to visualise zones in an city. My GeoJSON is a FeatureCollection with multiple polygons as features. I want to be able to add different popups for different polygons in the file. The idea is to show names of the different polygons in the GEOJSON file. I was able to add a popup to the complete geoJSON. However, I want to be able to add different popup for different polygons (essentially the name of the feature). folium.GeoJson(gurgaon_subzone,name='geojson').add_child(folium