From 6058b75ecd93b9dc0fb9e03373ab13d387ccb246 Mon Sep 17 00:00:00 2001 From: Corentin LEMAITRE Date: Wed, 27 Jun 2018 09:03:30 +0200 Subject: [PATCH] Modify heading + add 1 point near map center I use your code and acheive to make it work. First time i was happy to see trucks on streets. I am not a developper just SIG user, i have corrected the heading angle to match with street orientation. I have also add one point (truck) to put it near the start location. --- examples/data/points.geojson | 170 ++++------------------------------- 1 file changed, 16 insertions(+), 154 deletions(-) diff --git a/examples/data/points.geojson b/examples/data/points.geojson index cc4d3c32..348c306b 100644 --- a/examples/data/points.geojson +++ b/examples/data/points.geojson @@ -1,155 +1,17 @@ { - "type": "FeatureCollection", - "features": [ - { - "type": "Feature", - "properties": { - "id": "001", - "heading": 0, - "size": 20 - }, - "geometry": { - "type": "Point", - "coordinates": [ - -122.44848489761347, - 37.78711479331146 - ] - } - }, - { - "type": "Feature", - "properties": { - "id": "002", - "heading": 10, - "size": 22 - }, - "geometry": { - "type": "Point", - "coordinates": [ - -122.44138240814203, - 37.784113193898264 - ] - } - }, - { - "type": "Feature", - "properties": { - "id": "003", - "heading": 20, - "size": 18 - }, - "geometry": { - "type": "Point", - "coordinates": [ - -122.4721258878708, - 37.80438433939691 - ] - } - }, - { - "type": "Feature", - "properties": { - "id": "004", - "heading": 30, - "size": 20 - }, - "geometry": { - "type": "Point", - "coordinates": [ - -122.477388381958, - 37.76545645336399 - ] - } - }, - { - "type": "Feature", - "properties": { - "id": "005", - "heading": 40, - "size": 24 - }, - "geometry": { - "type": "Point", - "coordinates": [ - -122.37969964742655, - 37.79636895736933 - ] - } - }, - { - "type": "Feature", - "properties": { - "id": "006", - "heading": 50, - "size": 27 - }, - "geometry": { - "type": "Point", - "coordinates": [ - -122.3963668942451, - 37.79800092745137 - ] - } - }, - { - "type": "Feature", - "properties": { - "id": "007", - "heading": 60, - "size": 22 - }, - "geometry": { - "type": "Point", - "coordinates": [ - -122.4184548854828, - 37.75228365607875 - ] - } - }, - { - "type": "Feature", - "properties": { - "id": "008", - "heading": 70, - "size": 30 - }, - "geometry": { - "type": "Point", - "coordinates": [ - -122.4379599094391, - 37.745448230008236 - ] - } - }, - { - "type": "Feature", - "properties": { - "id": "009", - "heading": 80, - "size": 20 - }, - "geometry": { - "type": "Point", - "coordinates": [ - -122.3898303508758, - 37.78364471293512 - ] - } - }, - { - "type": "Feature", - "properties": { - "id": "010", - "heading": 90, - "size": 20 - }, - "geometry": { - "type": "Point", - "coordinates": [ - -122.42338210344315, - 37.795887837230445 - ] - } - } - ] -} \ No newline at end of file +"type": "FeatureCollection", +"name": "points", +"features": [ +{ "type": "Feature", "properties": { "id": "001", "heading": -80, "size": 20 }, "geometry": { "type": "Point", "coordinates": [ -122.448484897613469, 37.78711479331146 ] } }, +{ "type": "Feature", "properties": { "id": "002", "heading": 9, "size": 22 }, "geometry": { "type": "Point", "coordinates": [ -122.441382408142033, 37.784113193898264 ] } }, +{ "type": "Feature", "properties": { "id": "003", "heading": -40, "size": 18 }, "geometry": { "type": "Point", "coordinates": [ -122.472125887870803, 37.804384339396911 ] } }, +{ "type": "Feature", "properties": { "id": "004", "heading": 5, "size": 20 }, "geometry": { "type": "Point", "coordinates": [ -122.477388381957994, 37.765456453363988 ] } }, +{ "type": "Feature", "properties": { "id": "005", "heading": -130, "size": 24 }, "geometry": { "type": "Point", "coordinates": [ -122.379699647426548, 37.796368957369332 ] } }, +{ "type": "Feature", "properties": { "id": "006", "heading": -50, "size": 27 }, "geometry": { "type": "Point", "coordinates": [ -122.396366894245105, 37.798000927451369 ] } }, +{ "type": "Feature", "properties": { "id": "007", "heading": 95, "size": 22 }, "geometry": { "type": "Point", "coordinates": [ -122.418454885482802, 37.752283656078752 ] } }, +{ "type": "Feature", "properties": { "id": "008", "heading": 95, "size": 30 }, "geometry": { "type": "Point", "coordinates": [ -122.437959909439101, 37.745448230008236 ] } }, +{ "type": "Feature", "properties": { "id": "009", "heading": 45, "size": 20 }, "geometry": { "type": "Point", "coordinates": [ -122.389830350875798, 37.783644712935121 ] } }, +{ "type": "Feature", "properties": { "id": "010", "heading": -80, "size": 20 }, "geometry": { "type": "Point", "coordinates": [ -122.423382103443146, 37.795887837230445 ] } }, +{ "type": "Feature", "properties": { "id": "011", "heading": 135, "size": 20 }, "geometry": { "type": "Point", "coordinates": [ -122.413049235258342, 37.772963742317728 ] } } +] +}