SlideShare uma empresa Scribd logo
1 de 75
Baixar para ler offline
+
+
Richard Süselbeck
Developer Evangelist
HERE Technologies
@sueselbeck
@heredev
The world‘s leading location technology company
Determine user‘s location
Find and display nearby sights, user can scroll through sights
Find route to sight, user can scroll through instructions
Expectations
Where am I?
https://github.com/leopectus/connectiq-workshop
So we are at 38.8565, -94.80069. 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, GLONASS
GNSS
How did we get the location?
GPS, GLONASS, GALILEO, BeiDou, NAVIC, QZSS
GNSS
Example: Positioning in Monkey C
Position.enableLocationEvents(
Position.LOCATION_ONE_SHOT,
method(:onPosition));
function onPosition(info) {
var lat = info.position.toDegrees()[0];
var long = info.position.toDegrees()[1];
}
How did we get the location?
There are other ways to get location.
e.g. radio signals:
Cell towers, Wi-Fi, Bluetooth, etc
e.g. IP address
Where am I?
Use a Positioning API.
Understand where the location comes from.
Choose the right API for the right task/device.
On your Connect IQ device: GPS/GLONASS
Where am I?
By themselves a latitude and longitude aren‘t always helpful.
Often their power is in placing us on a map.
Maps
Making Maps is hard.
Maps
Making Maps is hard.
Maps
Maps
https://github.com/leopectus/connectiq-workshop
Map Image API
https://developer.here.com/documentation/map-image/
Example: Map Image API
https://image.maps.api.here.com/mia/1.6/mapview?
&app_id=YOUR_APP_ID
&app_code=YOUR_APP_CODE
&c=37.37774,-121.92186
&z=14
&w=210
&h=110
center of the map
zoom level
image width and height
credentials
Example: Map Image API
Communications.makeWebRequest(url,
parameters,
options,
listener);
Communications.makeImageRequest(url,
parameters,
options,
listener);
Example: Map Image API
url = "https://image.maps.cit.api.here.com/mia/1.6/mapview";
parameters = {
"app_id" => Ui.loadResource(Rez.Strings.app_id),
"app_code" => Ui.loadResource(Rez.Strings.app_code),
"c" => 37.37774,-121.92186,
"h" => "210",
"w" => "210",
"z" => "14",
};
options = {
:dithering => Communications.IMAGE_DITHERING_FLOYD_STEINBERG
};
Example: Map Image API
Comm.makeImageRequest(url,parameters,options,method(:onReceive));
function onReceive(responseCode, data) {
if (responseCode == 200) {
mapImage = data;
} else {
System.println("Error: " + responseCode);
}
}
Where am I?
1200 E. 151st St.,
Olathe, Kansas 66062-3426
Where am I?
Invalidenstraße 116
10245 Berlin
1200 E. 151st St.,
Olathe, Kansas 66062-3426
Geocoder API
https://developer.here.com/documentation/geocoder/
Geocoder API
38.85689,-94.79921
Invalidenstraße 116
10245 Berlin52.530861,13.38474
1200 E. 151st St.,
Olathe, Kansas 66062-3426
https://reverse.geocoder.api.here.com/6.2/reversegeocode.json?
&mode=retrieveAddresses
&prox=52.530861,13.38474
Example: HERE Geocoder API
https://geocoder.api.here.com/6.2/geocode.json
?searchtext=1200+E+151st+St+Olathe+Kansas
return the closest street address
location (and radius)
search
string
Example: Geocoder in Monkey C
url = "https://reverse.geocoder.api.here.com/6.2/reversegeocode.json";
parameters = {
"app_id" => Ui.loadResource(Rez.Strings.app_id),
"app_code" => Ui.loadResource(Rez.Strings.app_code),
"mode" => "retrieveAddress"
"prox" => lat + "," + long + ",250",
};
options = {
:responseType => Comm.HTTP_RESPONSE_CONTENT_TYPE_JSON
};
Example: Geocoder in Monkey C
Comm.makeWebRequest(url,parameters,options,method(:onReceive));
function onReceive(responseCode, data) {
if (responseCode == 200) {
parseResponse(data);
} else {
addressText = responseCode;
}
}
Example: Geocoder in Monkey C
function parseResponse(data) {
var response = data.get("Response");
var viewArray = response.get("View");
var view = viewArray[0];
var resultArray = view.get("Result");
var result = resultArray[0];
var location = result.get("Location");
var address = location.get("Address");
addressText = address.get("Label");
}
16K
16K
maximum size of JSON response
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.
Places API
https://developer.here.com/documentation/places/
Example: HERE Places API
https://places.demo.api.here.com/places/v1/discover/here?
at=52.530861,13.38474 center of search
How do I get there?
Find your way using the Routing API.
Routing API
https://developer.here.com/documentation/routing/
Example: HERE Routing API
https://route.api.here.com/routing/7.2/calculateroute.json?
waypoint0=38.92812,-94.70251
&waypoint1=37.615,122.393
&mode=fastest;car;traffic:enabled
start and end point
routing mode
EXAMPLE: Map Image with Route
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
https://developer.here.com
+
After the break: Workshop Session!
Hands-on, bring your laptop!
Resources
https://developer.here.comFree Trial:
https://developer.here.com/documentationDocs:
https://www.slideshare.net/heretechSlides:
https://github.com/heremapsCode:
https://stackoverflow.com/questions/tagged/here-apiHelp:
@sueselbeckTwitter: @heredev

Mais conteúdo relacionado

Semelhante a Garmin Developer Summit 2018 - Talk

Geo distance search with my sql presentation
Geo distance search with my sql presentationGeo distance search with my sql presentation
Geo distance search with my sql presentation
GSMboy
 
Geolocation on Rails
Geolocation on RailsGeolocation on Rails
Geolocation on Rails
nebirhos
 

Semelhante a Garmin Developer Summit 2018 - Talk (20)

Where20 2008 Ruby Tutorial
Where20 2008 Ruby TutorialWhere20 2008 Ruby Tutorial
Where20 2008 Ruby Tutorial
 
GeoTechTalk InkSatogaeri Project
GeoTechTalk InkSatogaeri ProjectGeoTechTalk InkSatogaeri Project
GeoTechTalk InkSatogaeri Project
 
Das Web Wird Mobil - Geolocation und Location Based Services
Das Web Wird Mobil - Geolocation und Location Based ServicesDas Web Wird Mobil - Geolocation und Location Based Services
Das Web Wird Mobil - Geolocation und Location Based Services
 
Beacons, Raspberry Pi & Node.js
Beacons, Raspberry Pi & Node.jsBeacons, Raspberry Pi & Node.js
Beacons, Raspberry Pi & Node.js
 
Physical web
Physical webPhysical web
Physical web
 
Handling Real-time Geostreams
Handling Real-time GeostreamsHandling Real-time Geostreams
Handling Real-time Geostreams
 
Handling Real-time Geostreams
Handling Real-time GeostreamsHandling Real-time Geostreams
Handling Real-time Geostreams
 
Rails GIS Hacks
Rails GIS HacksRails GIS Hacks
Rails GIS Hacks
 
Where in the world
Where in the worldWhere in the world
Where in the world
 
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016
Geospatial Graphs made easy with OrientDB - Codemotion Warsaw 2016
 
Rails Gis Hacks
Rails Gis HacksRails Gis Hacks
Rails Gis Hacks
 
Eddystone Beacons - Physical Web - Giving a URL to All Objects
Eddystone Beacons - Physical Web - Giving a URL to All ObjectsEddystone Beacons - Physical Web - Giving a URL to All Objects
Eddystone Beacons - Physical Web - Giving a URL to All Objects
 
Giving a URL to All Objects using Beacons²
Giving a URL to All Objects using Beacons²Giving a URL to All Objects using Beacons²
Giving a URL to All Objects using Beacons²
 
The journey of an (un)orthodox optimization
The journey of an (un)orthodox optimizationThe journey of an (un)orthodox optimization
The journey of an (un)orthodox optimization
 
Sample document
Sample documentSample document
Sample document
 
Geo distance search with my sql presentation
Geo distance search with my sql presentationGeo distance search with my sql presentation
Geo distance search with my sql presentation
 
How to Build Your Own Ridesharing App (droidcon NYC 2018)
How to Build Your Own Ridesharing App (droidcon NYC 2018)How to Build Your Own Ridesharing App (droidcon NYC 2018)
How to Build Your Own Ridesharing App (droidcon NYC 2018)
 
Geolocation on Rails
Geolocation on RailsGeolocation on Rails
Geolocation on Rails
 
Presto anatomy
Presto anatomyPresto anatomy
Presto anatomy
 
Indoor positioning for every app
Indoor positioning for every appIndoor positioning for every app
Indoor positioning for every app
 

Mais de HERE Technologies

Mais de HERE Technologies (8)

Garmin Developer Summit 2018 - Lightning Talk
Garmin Developer Summit 2018 - Lightning TalkGarmin Developer Summit 2018 - Lightning Talk
Garmin Developer Summit 2018 - Lightning Talk
 
HERE Intermodal Routing API (GeoMonday Berlin 2018)
HERE Intermodal Routing API (GeoMonday Berlin 2018)HERE Intermodal Routing API (GeoMonday Berlin 2018)
HERE Intermodal Routing API (GeoMonday Berlin 2018)
 
HERE at Bosch Connected Experience Hackathon
HERE at Bosch Connected Experience HackathonHERE at Bosch Connected Experience Hackathon
HERE at Bosch Connected Experience Hackathon
 
Critical Apps Challenge Webinar 2018
Critical Apps Challenge Webinar 2018Critical Apps Challenge Webinar 2018
Critical Apps Challenge Webinar 2018
 
Where Camp 2017 Berlin
Where Camp 2017 BerlinWhere Camp 2017 Berlin
Where Camp 2017 Berlin
 
SpaceTech Hackathon 2017 Webinar
SpaceTech Hackathon 2017 WebinarSpaceTech Hackathon 2017 Webinar
SpaceTech Hackathon 2017 Webinar
 
Location Services 101
Location Services 101Location Services 101
Location Services 101
 
The Future of Location Technology for Developers (GeoIT Navigation Talks Berl...
The Future of Location Technology for Developers (GeoIT Navigation Talks Berl...The Future of Location Technology for Developers (GeoIT Navigation Talks Berl...
The Future of Location Technology for Developers (GeoIT Navigation Talks Berl...
 

Último

Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
UK Journal
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Último (20)

TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 

Garmin Developer Summit 2018 - Talk