introduction to map and location apis (silicon valley code camp 2017)
TRANSCRIPT
![Page 1: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/1.jpg)
Where amI?
![Page 2: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/2.jpg)
![Page 3: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/3.jpg)
![Page 4: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/4.jpg)
![Page 5: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/5.jpg)
We’re never really lostanymore.
![Page 6: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/6.jpg)
LocationTechnology
Locationtechnology is anintegralpart of our daily lives.
![Page 7: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/7.jpg)
LocationTechnology"80%of alldata is connected to location."
AbrahamLincoln
![Page 8: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/8.jpg)
![Page 9: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/9.jpg)
![Page 10: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/10.jpg)
RichardSüselbeckDeveloperEvangelistHERETechnologies
@sueselbeck#svcc
SiliconValley
CODECAMP
![Page 11: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/11.jpg)
Expectations
developer.here.com
![Page 12: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/12.jpg)
Where amI?
![Page 13: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/13.jpg)
Example:BrowserGeolocation API
navigator.geolocation.getCurrentPosition(function(position) {document.write(position.coords.latitude + ", " +
position.coords.longitude);});
![Page 14: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/14.jpg)
Example:HEREAndroidPositioning API
PositioningManager positioningManager =PositioningManager.getInstance();
positioningManager.start(PositioningManager.LocationMethod.GPS_NETWORK);
GeoPosition position = positioningManager.GetPosition();
![Page 15: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/15.jpg)
Sowe are at37.3723,-121.9222.Whatdoesthatmean?
Latitude&Longitude
Latitude Longitude
Equator
PrimeMeridian
+60
-30
-90(South)
+90(North) 180
-120(West)
+30(East)
![Page 16: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/16.jpg)
How did weget thelocation?
![Page 17: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/17.jpg)
How did weget thelocation?
GPS
![Page 18: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/18.jpg)
How did weget thelocation?
GPS,GALILEO,GLONASS,BeiDou,NAVIC,QZSS
GNSS
![Page 19: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/19.jpg)
How did weget thelocation?
GNSSisn‘t theonly way toget alocation.
Radiosignals:Celltowers,Wifi,Bluetooth,etc
![Page 20: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/20.jpg)
Example:HEREPositioning API
https://pos.api.here.com/positioning/v1/locate?app_id=YOUR_APP_ID&app_code=YOUR_APP_CODE credentials
{ "wlan": [
{"mac": "8C-1A-BF-20-66-AD"}, {"mac": "A0-E4-53-E9-66-A7"}, ... {"mac": "B8-6B-23-09-87-B1"}, {"mac": "F4-55-95-11-2C-C1"}
] }
![Page 21: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/21.jpg)
Where amI?
Use aPositioning API.
Understand the technology the location comes from.Choose therightAPIfortherighttask/device.
![Page 22: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/22.jpg)
WhereamI?By themselves alatitude and longitude aren‘t always helpful.
Their poweris inplacing us onamap.
![Page 23: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/23.jpg)
MapsMakingMapsis hard.
![Page 24: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/24.jpg)
MapsMakingMapsis hard.
![Page 25: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/25.jpg)
Maps
![Page 26: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/26.jpg)
Maps
![Page 27: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/27.jpg)
Map APIs
Map ImageAPI InteractiveMap API
![Page 28: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/28.jpg)
Example:HEREMap ImageAPI
https://image.maps.api.here.com/mia/1.6/mapview?&c=37.37774,-121.92186&z=16&w=640&h=400
centerofthemapzoomlevel
Imagewidthandheight
![Page 29: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/29.jpg)
Example:HEREMap ImageAPI
https://image.maps.api.here.com/mia/1.6/route?&r0=52.540867,13.262444,52.536691,13.264561,52.529172,13.268337,52.528337,13.273144,52.52583,13.27898,52.518728,13.279667&lc0=44ff00ff
waypoints
linecolor
![Page 30: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/30.jpg)
Example:HEREInteractiveMaps APIvar platform = new H.service.Platform({
app_id: ’1234567890',app_code: abcdefghi',useHTTPS: true
});
var defaultLayers = platform.createDefaultLayers();
var map = new H.Map(document.getElementById('map'),defaultLayers.normal.map);
var behavior = new H.mapevents.Behavior(newH.mapevents.MapEvents(map));
var ui = H.ui.UI.createDefault(map, defaultLayers);
![Page 31: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/31.jpg)
WhereamI?2161N.FirstStSanJose,California95131
![Page 32: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/32.jpg)
WhereamI?2161N.FirstStSanJose,California95131
Invalidenstraße 11610245Berlin
![Page 33: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/33.jpg)
Geocoder API
37.37627,-121.9225692161N.FirstStSanJose,California95131
Invalidenstraße 11610245Berlin37.37627,-121.922569
![Page 34: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/34.jpg)
https://reverse.geocoder.api.here.com/6.2/reversegeocode.json?&mode=retrieveAddresses&prox=52.5319841,13.3828921
Example:HEREGeocoder API
https://geocoder.api.here.com/6.2/geocode.json?&searchtext=2161+n+first+st+san+jose+california+95131
returnthecloseststreetaddresslocation(andradius)
![Page 35: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/35.jpg)
What‘s around us?Maps provide context for alocation.
Places(points of interest)are another typeof context.
![Page 36: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/36.jpg)
WheredoIwant togo?
Locationisn‘t justabout where youare.It‘s about where you‘re going.
![Page 37: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/37.jpg)
Example:HEREPlacesAPI
// creates a Search entrypointvar search = new H.places.Search(platform.getPlacesService());// creates parameters for search requestvar params = {
'q': 'starbucks','at': '37.3720,-121.9221'
};// creates a request with callbackssearch.request(params, {}, onResult, onError);
function onResult(result) {}
function onError(error) {}
![Page 38: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/38.jpg)
Example:HEREInteractiveMaps API
var group = new H.map.Group();
group.addObjects(places.map(function (place) {var marker = new H.map.Marker({lat: place.position[0],
lng: place.position[1]})return marker;
}));
map.addObject(group);
map.setViewBounds(group.getBounds());
![Page 39: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/39.jpg)
How doIget there?Findyour way using the RoutingAPI.
![Page 40: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/40.jpg)
Example:HERERoutingAPI
https://route.api.here.com/routing/7.2/calculateroute.json?waypoint0=37.377,-121.921&waypoint1=37.615,122.393&mode=fastest;car;traffic:enabled
startandendpoint
routingmode
![Page 41: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/41.jpg)
What can Ireach?Isoline RoutingAPI
Which places can adelivery truck or taxi reach within 15minutes?
![Page 42: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/42.jpg)
Example:HEREIsoline RoutingAPI
#07
var routingParams = { 'mode': 'fastest;car;', 'start': '37.80531,-122.4161', 'range': '900', 'rangetype': 'time'
};
var router = platform.getRoutingService();
router.calculateIsoline(routingParams,onResult,onError;});
![Page 43: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/43.jpg)
Locationis solved!(sort of)
![Page 44: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/44.jpg)
But:TheFutureis coming!
![Page 45: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/45.jpg)
TheFuture™
10BillionPeople
GiantCities
Autonomous cars
Autonomous everything!
Everything is asensor! Newmobility concepts
![Page 46: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/46.jpg)
HEREOpenLocationPlatform
![Page 47: Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)](https://reader033.vdocuments.us/reader033/viewer/2022051101/5a65edd77f8b9ab21e8b4acf/html5/thumbnails/47.jpg)
@sueselbeck#svcc
Thank you!!
Abesays:“Signupondeveloper.here.com!”