Fix formatting in buffered polyline post
This commit is contained in:
parent
13609812b6
commit
58ca5c5f75
1 changed files with 2 additions and 2 deletions
|
@ -12,9 +12,9 @@ comments: true
|
||||||
share: true
|
share: true
|
||||||
---
|
---
|
||||||
|
|
||||||
At work, we needed a simple way to buffer a polyline in order to search for stuff along the route from A to B. I'll explain how we used Google's Map API and [JSTS](https://github.com/bjornharrtell/jsts) in order to achieve this easily.
|
At work, we needed a simple way to buffer a polyline in order to search for stuff along the route from A to B. I'll explain how we used Google's Maps API and [JSTS](https://github.com/bjornharrtell/jsts) in order to achieve this easily.
|
||||||
|
|
||||||
The first thing we had to do, was to "transform" each element in the overview_path (which the `DirectionsService` returns) to GeoJSON, because that's what JSTS understands.
|
The first thing we had to do, was to "transform" each element in the `overview_path` (which the `DirectionsService` returns) to GeoJSON, because that's what JSTS understands.
|
||||||
|
|
||||||
{% highlight javascript linenos %}
|
{% highlight javascript linenos %}
|
||||||
var overviewPath = response.routes[0].overview_path,
|
var overviewPath = response.routes[0].overview_path,
|
||||||
|
|
Loading…
Reference in a new issue