Skip to content

Instantly share code, notes, and snippets.

View leopectus's full-sized avatar

Richard Süselbeck leopectus

View GitHub Profile
{
"response": {
"metaInfo": {
"timestamp": "2018-09-04T19:39:57Z",
"mapVersion": "8.30.87.152",
"moduleVersion": "7.2.201833-37031",
"interfaceVersion": "2.6.34",
"availableMapVersion": [
"8.30.87.152"
]
{
"results": {
"next": "https://places.api.here.com/places/v1/discover/explore;context=Y2F0PXNpZ2h0cy1tdXNldW1zJmZsb3ctaWQ9MDNhNWNhZmItOGY2ZS01ZTQ4LWE5ZTUtMjM3MWE3NTY1ZDdhXzE1MzYwODk4NjY1MjVfMF82MjQzJm9mZnNldD01JnNpemU9NQ?at=37.784117%2C-122.401386&app_id=inyah45axuPunUzafruc&app_code=dSeR84rhEUZEwBEV1NVGaA",
"items": [
{
"position": [
37.784117,
-122.401386
],
"distance": 0,
function makeRoutingWebRequest() {
routingUrl = "https://route.api.here.com/routing/7.2/calculateroute.json";
routingParameters = {
"app_id" => WatchUi.loadResource(Rez.Strings.app_id),
"app_code" => WatchUi.loadResource(Rez.Strings.app_code),
"waypoint0" => "37.784117,-122.401386",
"waypoint1" => destinationWaypoint,
"mode" => "shortest;pedestrian",
function makePlacesWebRequest() {
placesUrl = "https://places.api.here.com/places/v1/discover/explore";
placesParameters = {
"app_id" => WatchUi.loadResource(Rez.Strings.app_id),
"app_code" => WatchUi.loadResource(Rez.Strings.app_code),
"at" => "37.784117,-122.401386",
"cat" => "sights-museums",
"size" => "5"
AdminInfo: {
TimeZoneOffset: "UTC+08:00",
Currency: "SGD",
DrivingSide: "left",
SystemOfMeasure: "metric"
}
postalCode: "81009",
additionalData: [
{
value: "United States",
key: "CountryName"
},
{
value: "Colorado",
key: "StateName"
addressDetails: {
countryCode: "ESP",
country: {
value: "Spain",
language: "en"
},
state: {
value: "Andalucia",
language: "en"
},
{
countryCode: "ESP",
country: {
value: "Spain",
language: "en"
},
state: {
value: "Andalucia",
language: "en"
},
@leopectus
leopectus / javascript-route.js
Created October 8, 2015 10:01
Maps API for JavaScript snippet generated by the HERE API Explorer (calculate route from A to B using public transport)
/*
* @param {H.service.Platform} platform
*/
function calculateRoute(platform) {
var router = platform.getRoutingService(),
parameters = {
waypoint0: '52.5208,13.4093',
waypoint1: '52.5034,13.3295',
mode: 'fastest;publicTransport',
combineChange: 'true'};
@leopectus
leopectus / jquery-route.js
Created October 8, 2015 10:00
jQuery snippet generated by the HERE API Explorer (calculate route from A to B using public transport)
// This example is using demo credentials. Please replace
// {YOUR_APP_CODE} and {YOUR_APP_ID} in your own code
// Remove .cit and use the production environment when ready.
$.ajax({
url: 'https://route.cit.api.here.com/routing/7.2/calculateroute.json',
type: 'GET',
dataType: 'jsonp',
jsonp: 'jsoncallback',
data: {