Tagged Questions
0
votes
0answers
28 views
How do I add elevation data to a GeoJSON line from a GPX file?
I understand that elevation can be added as an optional third value in Coordinates (lat, long, elev) in a geojson file, but I can't find a way to actually do that from a gpx file. I've used ogr2ogr to ...
1
vote
2answers
83 views
How to add a polygon from GeoJson into Leaflet?
I try to use the following function to add polygons to my Leaflet map.
function polygon(geojson)
{
alert(geojson); // alert for testing
layer = L.geoJson(geojson);
layer.addTo(map);
}
...
0
votes
1answer
89 views
What is the best way to use Leaflet and Geoserver to highligh a feature after a WMS request?
I have a web map, and I'm hoping to make it interactive.
The layer I have is reasonably large, at 15 mb in GeoJSON format 4 mb compressed, so I don't want to load the whole layer as one file. But, I ...
0
votes
0answers
79 views
Reprojecting coordinates and geoJSON in leaflet
I have a Leaflet map in default projection and a wms layer also in default (web mercator) projection. I would like to add polylines and a geoJSON layer to my map, but the coordinates are in EPSG4326. ...
0
votes
1answer
77 views
leaflet geojson contextmenu
I want to add a context menu on right click for various elements on my geojson layer (I'm doing a road map so on a right click on the road at any part I want to show the context menu).
I've managed ...
2
votes
1answer
175 views
leaflet geojson coordinate problem
I just started to play with leflet/geojson a little. But my coordinates are not rendered properly and I have no clue what is going on.
My coordinates are: 52.23943, 4.97599. They work correct with ...
0
votes
1answer
127 views
Geojson multipolygon doesn't work with Leaflet bindPopup?
I have polygon and multipolygon data in Geojson format and when I try to bind popup for polygon, it works perfectly, and when I try to bind it for multipolygon, it doesn't work.
Is that some Leaflet ...
1
vote
2answers
135 views
converted SHP to geoJSON - how to put this on OSM map?
I'm a beginner at this. I converted a shapefile to a .js file but I am having trouble adding this data to a map using leaflet.
The osmscarb.js:
var osmscarb = {
"type": "FeatureCollection",
...
3
votes
1answer
344 views
How to avoid corrupt geometries when translating between TopoJSON and GeoJSON?
I'm trying to display some geojson vector features on a leaflet map.
The size of my GeoJSON is too big (25.4mb of data, 8.47mb gzipped), so I'm trying to use a TopoJSON format to reduce the size ...
5
votes
4answers
308 views
GeoJSON too bulky - what to do?
I am using leaflet.js to allow web users to select a region. Valid regions are US states, Canadian providences, and world countries (except for US and Canada). I constructed a shapefile myself using ...
4
votes
1answer
134 views
binding nested arrays as geojson popups in leaflet
I am struggling with geojson popups in leaflet.js
I have nested arrays as properties for my features -
an example would be counts of fish caught at a location (not my actual project data!)
...
1
vote
1answer
491 views
What is the default projection in Leaflet?
I've read an API documentation for Leaflet on its site, but I can't realize: what is a default projection to view maps? It was written about spherical and elliptical Mercator and Equirectangular - so ...
1
vote
1answer
133 views
Polygon intersection with bounding box with polygon's holes intact
I am trying to serve GeoJSON FeatureCollection tiles with each feature's geometries trimmed to the tile boundary.
I am working on a Leaflet plugin to re-assemble the geometries. It works by building ...
1
vote
2answers
390 views
How to label GeoJSON polygons?
I'm using Leaflet combined with GeoJSON features. Is there a way to label GeoJSON features (in this case - polygons)? It should get labels from
feature.properties.name
This is my code where I ...
-1
votes
2answers
90 views
Go to the URL on click with GeoJSON
I'm using Leaflet API and geojson. I defined a function which zooms to the feature when clicked:
function zoomToFeature(e) {
map.fitBounds(e.target.getBounds());
}
function ...
4
votes
1answer
705 views
Auto zoom on multipolygon with leaflet
I have a geojson with a multipolygon and I want to fit this multipolygon to the map. The map center only on one polygon not on the multipolygon.
Here is my script
var map = L.map('map',{ ...
0
votes
2answers
737 views
leaflet and geojson tiles
New to mapping.
Trying to create a heat map with data that updates every hour for US Counties with leaflet.js similar to http://leaflet.cloudmade.com/examples/choropleth-example.html. But, adding ...
2
votes
1answer
285 views
formatting geojson from postgis data using node.js
I am trying to build a GeoJSON object from a SQL query to some GIS point data in a postgis postgresql database. A snippet of my node.js app.js is below.
As it stands I understand building the type ...
1
vote
1answer
124 views
Is it necessary to add Tile layer background?
Is it necessary to add tile layer for making a GeoJSON data rendered in web browser using Leaflet or any other API ?
I have a geoJSON data (I obtained the GeoJSON data by converting .shp file to ...
3
votes
1answer
1k views
How to add a geoJSON layer to leaflet map?
i am newbie in leaflet & its geojson features...
I am trying to test leaflet's functionalities. In fact i have built a map and its layer:
var map = new L.map('map', {scrollWheelZoom:true, ...
5
votes
1answer
480 views
Working examples of Leaflet/Polymaps with GeoJSON tiles generated from Tilestache using Shapefiles?
I'm looking to create choropleths using GeoJSON tiles generated from ESRI Shapefiles by TileStache(or similar), in either Leaflet or Polymaps. So far reading and drawing GeoJSON from both Leaflet and ...
2
votes
1answer
2k views
How do I get GeoJSON data from GeoServer into show up on my Leaflet map?
I'm trying to create a simple "Green" map for my city. The idea being that it is a website with a map and layers you can turn on and off. I am serving the data through GeoServer and am using GeoJOSN ...
3
votes
3answers
928 views
MySQL to GeoJSON - Formatting Issue
I'm trying to make a select on a mysql table and then write it out to a geojson file. I'm getting close but there are a few issues. Here's what I have so far:
<?php
require("dbinfo.php");
// ...
4
votes
2answers
883 views
How do you convert OSM XML to geojson?
I want to take the XML output of a Xapi query and display it using leaflet or polymaps. How can I do that? Is there an easy way to convert XML to geojson
8
votes
5answers
3k views
How to convert ArcGIS Server JSON to GeoJSON?
I'm creating a web map using Leaflet, and I want to be able to grab feature layers from our ArcServer. I have successfully been able to retrieve a feature class as JSON, but Esri's JSON objects don't ...
