All Questions
Tagged with linestring leaflet
15 questions
1
vote
0
answers
39
views
Remove/hide the long connecting line in plotting GeoJSON linestring using Leaflet [duplicate]
I encounter this long connecting line when plotting a GeoJSON linestring.
How do I hide/remove this connecting line?
When I plot it in linestring:
When I plot it manually (slower than using ...
4
votes
1
answer
2k
views
Add Line Layer from PostGIS to Leaflet
I have a line layer in PostGIS that I would like to add to a Leaflet map. I have the PHP setup, but I can't seem to get the Javascript correct. I know my issue is converting the line to geoJSON.
The ...
0
votes
1
answer
922
views
Getting width of road segment given its end points using Leaflet?
I want to highlight a road segment on a Leaflet Map. I have the coordinates of the end point of the road segment, so could plot it as a linestring. But the problem is how can I get the width of the ...
1
vote
1
answer
3k
views
How to use leaflet-measure-path with GeoJSON Linestring?
I am trying to use the "leaflet-measure-path" plugin for leaflet to print the segment length of some geojson linestrings.
I am using the "Leaflet Ajax" plugin to load the GeoJSON files into my map ...
2
votes
1
answer
2k
views
Cluster GeoJSON (linestrings and markers) into circles using Leaflet
I have different hiking routes (in geoJSON format) displayed on a map. They contain linestrings, multilinestrings and markers. Currently, it looks like this: http://www.hikethisway.today/Sweden.html.
...
1
vote
0
answers
240
views
Combine two GeoJSON files [duplicate]
Is there a clever way to combine two or more geoJSON files? I would like to combine the two geoJSON files here: https://gist.github.com/szeconku/3c0d3021178d8598f04dc5273864bd81
4
votes
1
answer
12k
views
How to get leaflet polyline segment length?
I'm working on a project that plots out some pipes on a leaflet map, these are displayed on the map as polylines with arrows showing flow direction.
i am feeding the data in as geojson linestrings ...
0
votes
1
answer
1k
views
Apply onEachFeature only on Points. Ignore LineStrings
I have a couple of GeoJSON files where each GeoJSON file contains a LineString and some Points (a LineString represents a hiking route and the points represent shelters). I would like to display the ...
2
votes
1
answer
3k
views
Calculate length of Multilinestrings/Linestrings/Polygons in geoJSON file
I have a couple of routes on my map where I would like to display the length of each route. I think I've found what I was looking for here: https://github.com/tyrasd/geojson-length, but I'm not sure ...
-1
votes
1
answer
696
views
Multilines appearing on map but ordinary lines are not
I'm trying to achieve two things: 1) Display lines on a map and 2) add pictures to a map.
1) I've successfully displayed multilines on a map using the Leaflet.js library. For some reason lines are ...
4
votes
3
answers
2k
views
Zoom on Linestring object in Leaflet
I'm using Leaflet and trying zooming on a LineString object from a geojson file.
Here is an extract of my file (with a lot of LineString objects):
{
"type": "FeatureCollection",
"features": [
...
3
votes
1
answer
1k
views
Determining if another marker (Point or Polyline) where marker Point dragged in Leaflet?
I'm trying to create interaction between 2 markers with Leaflet, I would like to be able to drag a marker onto another
Either between one point and one linestring, or between 2 points.
I added the ...
-1
votes
1
answer
833
views
JSON to line string
I'm getting a JSON return like so:
[{"lat":38.660274,"lng":-90.136198},{"lat":38.6613,"lng":-90.13860199999999},{"lat":38.664634,"lng":-90.141853},{"lat":38.664634,"lng":-90.141853},{"lat":38....
7
votes
1
answer
6k
views
Adding offset to GeoJSON layer in Leaflet?
Using the example GeoJSON tutorial code at leafletjs.com.
Change the myLines variable so that the two lines overlap, but run in opposite directions as follows:
var myLines = [{
"type": "...
3
votes
1
answer
4k
views
Drawing line following road using Leaflet [closed]
Short version:
What I wish to be able to do is drawing a polyline along part of a road. In that way marking certain houses, along this road.
Long Version:
I have several houses that I wish to mark ...