Tag Info

New answers tagged


From the example you linked to, there is a directions layer on the map. var directionsLayer = L.mapbox.directions.layer(directions) .addTo(map); The directions layer extends a leaflet LayerGroup, which from the leaflet documentation, has a function called toGeoJSON. So I would recommend trying something like: var directions_geojson = ...


The problem you will have by using ST_MakeLine(route.geom) is, that this function aggregates all geometries into one geometry, but you can't do this for the street name attribute for example, because the street name will probably change from road to road. So if you want to make more attributes available through Geoserver you can't use ST_MakeLine. Instead ...


A single-vertex line is an invalid geometry. It is essentially a point geometry. A line-offset cannot be determined for a line with only one vertex. Try eliminate invalid geometries with a filter on ST_IsValid: SELECT ST_OffsetCurve(t.geom, 3) FROM the_table AS t WHERE ST_IsValid(t.geom);


You can try RoadGraph plugin/Network analysis library. If you have two layers (they should be properly snapped): Set some settings Select point Start and Stop Calculate This plugin is based on a library that can be used to run queries programmatically. I don't know if English manual for it exists, here is Google Translated description of this ...

Top 50 recent answers are included