Beste leden,
Ik wil graag meerdere afstanden in excel kunnen berekenen, ik krijg het echter niet voor elkaar om een spreadsheet te coderen hier voor.
Een voorbeeld is http://www.kilometerafstanden.nl/kil...-postcodes.htm
Echter wil ik postcodes onder elkaar kunnen plakken en dan kunnen berekenen, het gaat telkens om 6/7 postcodes.
- Kilometerafstanden berekenen nodig
-
01-09-2014, 21:01 #1
- Berichten
- 162
- Lid sinds
- 12 Jaar
Kilometerafstanden berekenen nodig
-
01-09-2014, 23:25 #2
- Berichten
- 44
- Lid sinds
- 10 Jaar
Re: Kilometerafstanden berekenen nodig
Beste,
Hoe zie je dit voor je?
Wil je 1 basis postcode zoals 1234 AB en dan 10 variabele waarvan de afstand wordt berekend van 1234 AB tot aan de andere postcodes?
Of wil je 10 postcodes onder elkaar. De afstand weten van 1 tot 2, van 2 tot 3 en zo verder?
Groet,
Matthijs
-
01-09-2014, 23:31 #3
- Berichten
- 162
- Lid sinds
- 12 Jaar
Re: Kilometerafstanden berekenen nodig
Inderdaad meerdere postcodes onder elkaar, net als http://www.reiskostenvergoeding.nl/
-
01-09-2014, 23:31 #4
- Berichten
- 1.263
- Lid sinds
- 16 Jaar
Re: Kilometerafstanden berekenen nodig
Op postcodes kan je volgens mij niet echt afstanden berekenen, aangezien de postcodes niet 'logisch' zijn verdeeld in Nederland..
Dan zou je bijv. de Geolocatie per postcode moeten ophalen, ik denk dat het voorbeeld wat je geeft dit ook zo doet.. Kan het alleen niet echt bevestigen.
EDIT:
Ja dus, via de Google Maps API:
http://maps.googleapis.com/maps/api/js/DirectionsService.Route?4b0&5m2&1m1&2s1043AA&5m2&1 m1&2s1042AA&6e0&10b0&12snl-NL&100b0&102b0&callback=_xdc_._bhqz7x&token=8760
Dit is de feedback die je dan van Google terugkrijgt:
Code:/**/_xdc_._bhqz7x && _xdc_._bhqz7x( { "routes" : [ { "bounds" : { "northeast" : { "lat" : 52.4014124, "lng" : 4.8364005 }, "southwest" : { "lat" : 52.3851814, "lng" : 4.8188473 } }, "copyrights" : "Kaartgegevens ©2014 Google", "legs" : [ { "distance" : { "text" : "3,7 km", "value" : 3730 }, "duration" : { "text" : "7 min.", "value" : 405 }, "end_address" : "1042 AA Amsterdam, Nederland", "end_location" : { "lat" : 52.4014124, "lng" : 4.8364005 }, "start_address" : "1043 AA Amsterdam, Nederland", "start_location" : { "lat" : 52.3863938, "lng" : 4.8279415 }, "steps" : [ { "distance" : { "text" : "52 m", "value" : 52 }, "duration" : { "text" : "1 min.", "value" : 7 }, "end_location" : { "lat" : 52.3862029, "lng" : 4.828411099999999 }, "html_instructions" : "Vertrek in \u003cb\u003eoostelijke\u003c/b\u003e richting op de \u003cb\u003eSportpark Spieringhorn\u003c/b\u003e", "polyline" : { "points" : "}uv~Hs}m\\AoA@E?C@CB?^?" }, "start_location" : { "lat" : 52.3863938, "lng" : 4.8279415 }, "travel_mode" : "DRIVING" }, { "distance" : { "text" : "19 m", "value" : 19 }, "duration" : { "text" : "1 min.", "value" : 10 }, "end_location" : { "lat" : 52.38619809999999, "lng" : 4.8281335 }, "html_instructions" : "Sla \u003cb\u003erechtsaf\u003c/b\u003e om op de \u003cb\u003eSportpark Spieringhorn\u003c/b\u003e te blijven", "maneuver" : "turn-right", "polyline" : { "points" : "wtv~Hq`n\\?Z?Z" }, "start_location" : { "lat" : 52.3862029, "lng" : 4.828411099999999 }, "travel_mode" : "DRIVING" }, { "distance" : { "text" : "0,1 km", "value" : 97 }, "duration" : { "text" : "1 min.", "value" : 20 }, "end_location" : { "lat" : 52.3853298, "lng" : 4.8281963 }, "html_instructions" : "Neem de 1e afslag \u003cb\u003elinks\u003c/b\u003e, \u003cb\u003eSeineweg/Sportpark Spieringhorn\u003c/b\u003e op", "polyline" : { "points" : "wtv~Hy~m\\zCKPA" }, "start_location" : { "lat" : 52.38619809999999, "lng" : 4.8281335 }, "travel_mode" : "DRIVING" }, { "distance" : { "text" : "0,6 km", "value" : 636 }, "duration" : { "text" : "1 min.", "value" : 79 }, "end_location" : { "lat" : 52.3859383, "lng" : 4.8198225 }, "html_instructions" : "Sla \u003cb\u003erechtsaf\u003c/b\u003e naar de \u003cb\u003eSeineweg/Spaarnwouderdijk\u003c/b\u003e\u003cdiv style=\"font-size:0.9em\"\u003eGa verder op de Seineweg\u003c/div\u003e", "maneuver" : "turn-right", "polyline" : { "points" : "iov~Hg_n\\@ZAdE?|D@hBHx@HtA@RD|ZALCNGNGHIDGBaA@YBIFIN" }, "start_location" : { "lat" : 52.3853298, "lng" : 4.8281963 }, "travel_mode" : "DRIVING" }, { "distance" : { "text" : "65 m", "value" : 65 }, "duration" : { "text" : "1 min.", "value" : 18 }, "end_location" : { "lat" : 52.385945, "lng" : 4.8188607 }, "html_instructions" : "Neem de 1e afslag \u003cb\u003elinks\u003c/b\u003e om op \u003cb\u003eSeineweg\u003c/b\u003e te blijven", "polyline" : { "points" : "csv~H{jl\\?Z?Z?lA?x@" }, "start_location" : { "lat" : 52.3859383, "lng" : 4.8198225 }, "travel_mode" : "DRIVING" }, { "distance" : { "text" : "0,6 km", "value" : 563 }, "duration" : { "text" : "1 min.", "value" : 74 }, "end_location" : { "lat" : 52.3910061, "lng" : 4.8189777 }, "html_instructions" : "Neem de 2e afslag \u003cb\u003erechts\u003c/b\u003e, \u003cb\u003eSeineweg/s103\u003c/b\u003e op", "polyline" : { "points" : "csv~H{dl\\]?qC?gA?qA?o@?I@YAY?gACU?U@a@?G@]@E?M?W?G?EAE?O?s@?u@C_@Aa@AWCUAk@Ek@C" }, "start_location" : { "lat" : 52.385945, "lng" : 4.8188607 }, "travel_mode" : "DRIVING" }, { "distance" : { "text" : "1,2 km", "value" : 1202 }, "duration" : { "text" : "2 min.", "value" : 102 }, "end_location" : { "lat" : 52.3915867, "lng" : 4.8362911 }, "html_instructions" : "Sla \u003cb\u003erechtsaf\u003c/b\u003e naar de \u003cb\u003eBasisweg/S102\u003c/b\u003e", "maneuver" : "turn-right", "polyline" : { "points" : "yrw~Hsel\\EKOCKGIIMQEKEIEa@QcBSoBCk@Ce@@{W?}W?eO?cO?I?I?i@?{@@_B?}ABK?q@Ay@" }, "start_location" : { "lat" : 52.3910061, "lng" : 4.8189777 }, "travel_mode" : "DRIVING" }, { "distance" : { "text" : "1,1 km", "value" : 1096 }, "duration" : { "text" : "2 min.", "value" : 95 }, "end_location" : { "lat" : 52.4014124, "lng" : 4.8364005 }, "html_instructions" : "Sla \u003cb\u003elinksaf\u003c/b\u003e naar de \u003cb\u003eRadarweg\u003c/b\u003e\u003cdiv style=\"font-size:0.9em\"\u003eU vindt uw bestemming links\u003c/div\u003e", "maneuver" : "turn-left", "polyline" : { "points" : "mvw~Hyqo\\IAMCM?Y?S?O@EBC?E?I?I@C?OASAeB?gB?U?U?Q?MAM?_HMm@CO@WFQDQDOHUDe@Hs@@{AKkAGC@I?a@Cs@EyAKcCE{CAuCBm@CoBA" }, "start_location" : { "lat" : 52.3915867, "lng" : 4.8362911 }, "travel_mode" : "DRIVING" } ], "via_waypoint" : [] } ], "overview_polyline" : { "points" : "}uv~Hs}m\\?uA@Gb@??v@lDM?`F@fHRnCFp[E\\OXQH{ADSV?~DwL?}ACw@@y@Bk@AcA?uAE{BMk@CEK[KW[KUWeCW{CAaY?ch@?aQ@{CBiBAkBWEkA@IBO?q@AyF?mIO}@Ai@La@N{@Ns@@{AKoAEyDU_HGcE?oBA" }, "summary" : "Seineweg, Basisweg/S102 en Radarweg", "warnings" : [], "waypoint_order" : [] } ], "status" : "OK" } )
Laatst aangepast door Robin L : 01-09-2014 om 23:37
-
01-09-2014, 23:46 #5
- Berichten
- 162
- Lid sinds
- 12 Jaar
Re: Kilometerafstanden berekenen nodig
Bedankt voor de informatie.
Echter hoe kan ik dit in excel coderen? Dit weet ik namelijk niet.
-
02-09-2014, 10:03 #6
- Berichten
- 442
- Lid sinds
- 16 Jaar
Re: Kilometerafstanden berekenen nodig
Misschien handig voor iedereen
http://pastebin.com/tHkg8djp
Dit haal ik zo maar even uit een van me applicaties. Variabelen aanpassen hoe je het zelf wilt hebben. Feedback is altijd welkom ;-)
$this->data['afstand'] is dus de afstand in km tussen de 2 postcodes
Plaats een
- + Advertentie
- + Onderwerp
Marktplaats
Webmasterforum
- Websites algemeen
- Sitechecks
- Marketing
- Domeinen algemeen
- Waardebepaling
- CMS
- Wordpress
- Joomla
- Magento
- Google algemeen
- SEO
- Analytics
- Adsense
- Adwords
- HTML / XHTML
- CSS
- Programmeren
- PHP
- Javascript
- JQuery
- MySQL
- Ondernemen algemeen
- Belastingen
- Juridisch
- Grafisch ontwerp
- Hosting Algemeen
- Hardware Info
- Offtopic