Where am	I?
We’re never really lost	anymore.
Location	Technology
Location	technology is an	integral	part of our daily lives.
Location	Technology
"80%	of all	data is connected to location."	
Abraham	Lincoln
Richard	Süselbeck
Developer	Evangelist
HERE	Technologies
@sueselbeck
#svcc
Silicon	Valley
CODE	CAMP
Expectations
developer.here.com
Where am	I?
Example:	Browser	Geolocation API	
navigator.geolocation.getCurrentPosition(function(position) {
document.write(position.coords.latitude + ", " +
position.coords.longitude);
});
Example:	HERE	Android	Positioning API	
PositioningManager positioningManager =
PositioningManager.getInstance();
positioningManager.start(
PositioningManager.LocationMethod.GPS_NETWORK);
GeoPosition position = positioningManager.GetPosition();
So	we are at	37.3723,	-121.9222.	What	does	that	mean?
Latitude	&	Longitude
Latitude Longitude
Equator
Prime	Meridian
+60
-30
-90	(South)
+90	(North) 180
-120	(West)
+30	(East)
How did we	get the	location?
How did we	get the	location?
GPS
How did we	get the	location?
GPS,	GALILEO,	GLONASS,	BeiDou,	NAVIC,	QZSS
GNSS
How did we	get the	location?
GNSS	isn‘t the	only way to	get a	location.
Radio	signals:
Cell	towers,	Wifi,	Bluetooth,	etc
Example:	HERE	Positioning 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"}
]
}
Where am	I?
Use a	Positioning API.
Understand the technology the location comes from.
Choose the	right	API	for	the	right	task/device.
Where	am	I?
By themselves a	latitude and longitude aren‘t always helpful.
Their power	is in	placing us on	a	map.
Maps
Making	Maps	is hard.
Maps
Making	Maps	is hard.
Maps
Maps
Map APIs
Map Image	API Interactive	Map API
Example:	HERE	Map Image	API
https://image.maps.api.here.com/mia/1.6/mapview?
&c=37.37774,	-121.92186
&z=16
&w=640
&h=400
center	of	the	map
zoom	level
Image	width	and	height
Example:	HERE	Map Image	API
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
line	color
Example:	HERE	Interactive	Maps API
var 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(new
H.mapevents.MapEvents(map));
var ui = H.ui.UI.createDefault(map, defaultLayers);
Where	am	I?
2161	N.	First	St
San	Jose,	California	95131
Where	am	I?
2161	N.	First	St
San	Jose,	California	95131
Invalidenstraße 116
10245	Berlin
Geocoder API
37.37627,	-121.922569
2161	N.	First	St
San	Jose,	California	95131
Invalidenstraße 116
10245	Berlin37.37627,	-121.922569
https://reverse.geocoder.api.here.com/6.2/reversegeocode.json?
&mode=retrieveAddresses
&prox=52.5319841,13.3828921
Example:	HERE	Geocoder API
https://geocoder.api.here.com/6.2/geocode.json?	
&searchtext=2161+n+first+st+san+jose+california+95131
return	the	closest	street	address
location	(and	radius)
What‘s around us?
Maps provide context for a	location.
Places	(points of interest)	are another type	of context.
Where	do	I	want to	go?
Location	isn‘t just	about where you	are.	It‘s about where you‘re going.
Example:	HERE	Places	API
// creates a Search entrypoint
var search = new H.places.Search(platform.getPlacesService());
// creates parameters for search request
var params = {
'q': 'starbucks',
'at': '37.3720,-121.9221'
};
// creates a request with callbacks
search.request(params, {}, onResult, onError);
function onResult(result) {}
function onError(error) {}
Example:	HERE	Interactive	Maps 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());
How do	I	get there?
Find	your way using the Routing	API.
Example:	HERE	Routing	API
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
start	and	end	point
routing	mode
What can I	reach?
Isoline Routing	API
Which places can a	delivery truck or taxi reach within 15	minutes?
Example:	HERE	Isoline Routing		API
#07
var routingParams = {
'mode': 'fastest;car;',
'start': '37.80531,-122.4161',
'range': '900',
'rangetype': 'time'
};
var router = platform.getRoutingService();
router.calculateIsoline(
routingParams,
onResult,onError;
});
Location	is solved!
(sort of)
But:	The	Future	is coming!
The	Future™
10	Billion	People
Giant	Cities
Autonomous cars
Autonomous everything!
Everything is a	sensor! New	mobility concepts
HERE	Open	Location	Platform
@sueselbeck
#svcc
Thank you!!
Abe	says:	“Sign	up	on	
developer.here.com!”

Introduction to Map and Location APIs (Silicon Valley Code Camp 2017)