geojson

Using Elastic Search Geo Functionality To Find Most Common Locations?

♀尐吖头ヾ 提交于 2019-12-06 19:36:30
I have a geojson file containing a list of locations each with a longitude, latitude and timestamp. Note the longitudes and latitudes are multiplied by 10000000. { "locations" : [ { "timestampMs" : "1461820561530", "latitudeE7" : -378107308, "longitudeE7" : 1449654070, "accuracy" : 35, "junk_i_want_to_save_but_ignore" : [ { .. } ] }, { "timestampMs" : "1461820455813", "latitudeE7" : -378107279, "longitudeE7" : 1449673809, "accuracy" : 33 }, { "timestampMs" : "1461820281089", "latitudeE7" : -378105184, "longitudeE7" : 1449254023, "accuracy" : 35 }, { "timestampMs" : "1461820155814", "latitudeE7

Google forEach map.data feature - return feature LatLng

馋奶兔 提交于 2019-12-06 16:41:52
I am trying to iterate through GeoJSON map.data using a forEach. I want to return the position (LatLng) of each feature so I can add it to my markers array based on a feature property. Here's my attempt: allMarkers = []; jQuery.getJSON('json.php', function(data){ points = map.data.addGeoJson(data); }); var eid = 30; map.data.forEach(function(feature){ if(feature.getProperty('eid') === eid){ LatLng = feature.getGeometry().LatLng; //not sure how to get LatLng id = feature.getProerty('id'); var marker = new google.maps.Marker({ position: LatLng, map: map, draggable: true, id: id, icon:

Leaflet GeoJSON display

倾然丶 夕夏残阳落幕 提交于 2019-12-06 16:02:14
I have encountered a task, that requires usage of leaflet js library with geojson as data storage. And almost immediately, following problem being encountered: polygon created from geojson object doesn't display on map. While polygon, created by native leaflet method - works perfectly. Here's my code: var map = new L.Map('map'); var bingLayer = new L.BingLayer('AhVaalRWmmprMAMHj6lw18ALO-iVnIGzvkq7gYAX3U_bisCT8Q_lgGV25YOa0kiV', 'Aerial'); map.setView(new L.LatLng(51.505, -0.09), 13).addLayer(bingLayer); var polygon = { "type": "Feature", "properties": { "style": { "color": "#004070", "weight":

How to use Leaflet flyTo() with unproject() and GeoJSON data on a large raster image?

情到浓时终转凉″ 提交于 2019-12-06 15:36:55
I'm building a story map with Leaflet using a large image sliced into tiles rather than 'real world' map data. I'm using this plugin: https://commenthol.github.io/leaflet-rastercoords/ and this repo: https://github.com/jackdougherty/leaflet-storymap Loading my GeoJSON data and unprojecting the coordinates correctly plots them on my image map: $.getJSON('map.geojson', function(data) { var geojson = L.geoJson(data, { // correctly map the geojson coordinates on the image coordsToLatLng: function (coords) { return rc.unproject(coords) }, But when I get to onEachFeature, I hit the wall with map

How to read geojson with vega

丶灬走出姿态 提交于 2019-12-06 14:58:09
It sounds super simple, but I can't get how can I use geojson, not topojson, for my polygons. that's my current attempt: "data": [ { "name": "nabs", "url": "both_boundaries.geojson", "format": {"type": "json"}, "transform": [ { "type": "geopath", "projection": "mercator", "scale": 74, "center": [-73.99,40.72] } ] } ] You have to parse the features using property within your format: "format": {"type": "json", "property":"features"}, Full example spec: {"$schema": "https://vega.github.io/schema/vega/v3.0.json", "width": 500, "height": 600, "autosize": "none", "signals": [ { "name": "translate0",

Plotting Points on a Map with d3.js

柔情痞子 提交于 2019-12-06 14:03:53
问题 For this project, I have a map of India in d3, with seperation by province. I'm trying to add points onto the map, but it just isn't working for me. The nodes are supposed to become bigger and smaller based on the amount of complaints that is specified in the csv file. Here is my code: visualize.html <!DOCTYPE html> <html lang="en"> <head> <!-- India State Map --> <title>India Map</title> <!-- Scripts --> <script type="text/javascript" src="d3.min.js"></script> <script type="text/javascript"

How to add GeoJSON points as a vector tile in Leaflet?

六眼飞鱼酱① 提交于 2019-12-06 13:23:12
I've read through every question on Stack Overflow I can find and every example I can find on the web for adding GeoJSON vector tiles to a leaflet map. Unfortunately I still can't manage to wrap my head around it, much less get it work on my data. I have a GeoJSON ( here ) with many points. I can add it just fine as a layer in Leaflet, so I feel confident that it's a valid file with real values. I've tried geojson-vt and leaflet vector grid . geojson-vt keeps returning an error: Uncaught ReferenceError: z is not defined at <anonymous>:1:30 with this code: geoJson = {data} var tileOptions = {

Put markers to a map generated with topoJSON and d3.js

若如初见. 提交于 2019-12-06 08:09:24
问题 I am creating a map of a particular state, I have been experimenting with d3.js and topojson and have created a great map, but now I want to add a marker on the map. But now I have problems because as I add the marker have a GeoJSON file to add markers to the map generated and also the power I'd like to open a tooltip whenever a marker is pressed. My map is very similar to this: http://bl.ocks.org/mbostock/4699541 and all I want is to add markers to states through a GeoJSON file that has the

入门Leaflet之小Demo

坚强是说给别人听的谎言 提交于 2019-12-06 07:44:28
入门Leaflet之小Demo 写在前面 ---- WebGIS开发基础之Leaflet GIS基本概念:GIS、Map、Layer、Feature、Geometry、Symbol、Data(Point、Polyline、Polygon)、Renderer、Scale、Project、Coordinates; GIS开发概述:架构模式、常用平台和SDK、二维三维 使用Leaflet开发常用功能 地图加载(底图类型、切换): 地图操作(缩放、平移、定位/书签、动画): 图层管理(加载、移除、调整顺序): 要素标绘(点/聚簇、线、面,符号化/静态动态): 属性标注(字段可选、样式定制): 专题地图(点、线、面,渲染): 查询定位(属性查询、空间查询/周边搜索/缓冲区/面查点线面/点线查面、图属互查、综合查询): 信息窗口(入口、Popup、定制): 坐标转换(): 空间运算(长度面积测量、点取坐标、缓冲区、相交包含关系): 动态监控(固定点状态切换、车辆监控): Leaflet API Demo用到的库 Flat-UI Flat UI is based on Bootstrap, a comfortable, responsive, and functional framework that simplifies the development of websites. Flat

GeoJson and D3.js multipolygon

六眼飞鱼酱① 提交于 2019-12-06 06:50:00
问题 I have this geometric shape file, so no map of a city. I store it in a GIS database as GeoJson. Now, I want to visualize the geojson data. I created the GeoJson data first with QGIS and exported it as Coordinate Reference System WGS 84 EPSG:4326 . This is an example data of Shapefile one: { "type":"FeatureCollection", "crs":{ "type":"name", "properties":{ "name":"urn:ogc:def:crs:OGC:1.3:CRS84" } }, "features":[ { "type":"Feature", "properties":{ "Membership":0.000000, "Membership_1":0.000000,