route360 / r360-js

Route360° JavaScript API (now Targomo)
https://www.targomo.com/developers/
MIT License
174 stars 37 forks source link

Add point of interest service #33

Closed gerbsen closed 6 years ago

gerbsen commented 7 years ago

we need a new service that queries the POI service

abenrob commented 7 years ago

Need documentation of POI service to do so

gerbsen commented 7 years ago

all I can give you now is this:

curl 'https://service.route360.net/pointofinterest/reachability' \
-XPOST \
-H 'Referer: https://app.route360.net/getraenkehoffmann/' \
-H 'Content-Type: application/json' \
-H 'Origin: https://app.route360.net' \
-H 'Host: service.route360.net' \
-H 'Accept: application/json, text/javascript, */*; q=0.01' \
-H 'Connection: keep-alive' \
-H 'Accept-Language: en-us' \
-H 'Accept-Encoding: gzip, deflate' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/604.1.27 (KHTML, like Gecko) Version/11.0 Safari/604.1.27' \
-H 'Content-Length: 1481' \
--data-binary '{"sources":[{"id":"1","lat":52.2217516,"lng":13.217997,"tm":{"car":{}}}],"targets":[],"bikeSpeed":20,"bikeUphill":40,"bikeDownhill":-20,"walkSpeed":5,"walkUphill":10,"walkDownhill":0,"travelTimes":[900,600,300],"travelType":"car","elevationEnabled":true,"minPolygonHoleSize":10000000,"time":"39600","date":"20150813","pathSerializer":"compact","polygonSerializer":"json","pointReduction":true,"maxRoutingTime":900,"serviceUrl":"https://service.route360.net/germany/","serviceKey":"T6TGCZJHAGE9DJWC4GE7J6N","edgeWeight":"time","osmTypes":[{"key":"amenity","value":"bar"},{"key":"amenity","value":"biergarten"},{"key":"amenity","value":"cafe"},{"key":"amenity","value":"pub"},{"key":"amenity","value":"restaurant"},{"key":"amenity","value":"atm"},{"key":"amenity","value":"fast_food"},{"key":"amenity","value":"fuel"},{"key":"amenity","value":"bank"},{"key":"amenity","value":"pharmacy"},{"key":"amenity","value":"post_box"},{"key":"amenity","value":"post_office"},{"key":"tourism","value":"hotel"},{"key":"tourism","value":"hostel"},{"key":"tourism","value":"motel"},{"key":"shop","value":"alcohol"},{"key":"shop","value":"bakery"},{"key":"shop","value":"beverages"},{"key":"shop","value":"convenience"},{"key":"shop","value":"department_store"},{"key":"shop","value":"kiosk"},{"key":"shop","value":"mall"},{"key":"shop","value":"supermarket"},{"key":"shop","value":"clothes"},{"key":"shop","value":"fashion"},{"key":"shop","value":"chemist"},{"key":"shop","value":"mobile_phone"}]}'

it's more or less a typical call with a bounding box and a lot of key values for types.

silberjan commented 6 years ago

this will be part of @targomo/core

gerbsen commented 6 years ago

Documentation can be found here