SlideShare a Scribd company logo
Prepared by
ENG SOON CHEAH
Microsoft MVP
11/23/2015 Prepared by ENG SOON CHEAH
11/23/2015 Prepared by ENG SOON CHEAH
Geolocator geolocator = new Geolocator();
// Define the accuracy for the location service in meters
// There is no point to set the accuracy to any value below 5;
// Also can define the location service accuracy in DesiredAccuracy with the options of Default or High
geolocator.DesiredAccuracyInMeters = 10;
Geoposition currentposition = await geolocator.GetGeopositionAsync(
maximumAge: TimeSpan.FromMinutes(5), // to specify the aging of the cache
timeout: TimeSpan.FromSeconds(10)); // to specify the timeout for the getting the location
information
// There is meaningless to obtaion the position value beyond 6 decimal points.
// It will ONLY crate unncessary calculation.
//
// Obtain the position value from Coordinate.Point.Position, the information in .Coordinate is retiring.
string latitude = currentposition.Coordinate.Point.Position.Latitude.ToString("0.000000");
string longitude = currentposition.Coordinate.Point.Position.Longitude.ToString("0.000000");
txtLocation.Text = latitude + "," + longitude;
11/23/2015 Prepared by ENG SOON CHEAH
11/23/2015 Prepared by ENG SOON CHEAH
var geolocator = new Geolocator();
geolocator.DesiredAccuracyInMeters = 100;
geolocator.DesiredAccuracy = PositionAccuracy.High;
Geoposition position = await geolocator.GetGeopositionAsync();
// reverse geocoding
BasicGeoposition myLocation = new BasicGeoposition
{
Longitude = position.Coordinate.Point.Position.Longitude,
Latitude = position.Coordinate.Point.Position.Latitude
};
Geopoint pointToReverseGeocode = new Geopoint(myLocation);
MapLocationFinderResult result = await MapLocationFinder.FindLocationsAtAsync(pointToReverseGeocode);
if (result.Status == MapLocationFinderStatus.Success)
{
if (result.Locations.Count != 0)
{
// here also it should be checked if there result isn't null and what to do in such a case
string country = result.Locations[0].Address.FormattedAddress;
txtLocation.Text += country.ToString();
}
}
11/23/2015 Prepared by ENG SOON CHEAH
This Result include Geocoding (Coordinates) and Reverse
Geocoding
11/23/2015 Prepared by ENG SOON CHEAH
• Microsoft Virtual Academy
https://mva.microsoft.com/en-US/training-courses/a-developer-
s-guide-to-windows-10-12618?l=o3HUevpRB_8105095281
• Channel 9
https://channel9.msdn.com/Series/Windows-10-development-
for-absolute-beginners
• GitHub
https://github.com/cheahengsoon/
• SlideShare
http://www.slideshare.net/cheahengsoon/
11/23/2015 Prepared by ENG SOON CHEAH

More Related Content

PPTX
Microservice performance-b
PPTX
Elixir 5 minute intro
PDF
Tank War and Katch and Pop
PPTX
BMC Keynote @ 2016 Hadoop Summit
PDF
The Fine Art of Time Travelling: implementing Event Sourcing - Andrea Saltare...
PDF
Processing Big Data in Realtime
PDF
PDF
Kafka short
Microservice performance-b
Elixir 5 minute intro
Tank War and Katch and Pop
BMC Keynote @ 2016 Hadoop Summit
The Fine Art of Time Travelling: implementing Event Sourcing - Andrea Saltare...
Processing Big Data in Realtime
Kafka short

What's hot (16)

PDF
MBLTDev: Phillip Connaughton, RunKepper
PPTX
Build Heap Step by Step
PDF
Federated HPC Clouds applied to Radiation Therapy
DOCX
whileloop
PDF
Nika it consulting weekly update
PDF
CS205 Final project
PDF
Demonstrating a Pre-Exascale, Cost-Effective Multi-Cloud Environment for Scie...
PDF
Hadoop analytics provisioning based on a virtual infrastructure
PPTX
Join ordering in fragment queries
PDF
Async JavaScript in ES7
PDF
Scaling metrics
KEY
Positronic Variables
PDF
AWS DEV DAY SEOUL 2017 Buliding Serverless Web App - 직방 Image Converter
PPTX
Earthquake Updates and Enhancements to Processing for Hazus-MH 3.2
PDF
Illustrator_Sample
PPSX
New dockets in
MBLTDev: Phillip Connaughton, RunKepper
Build Heap Step by Step
Federated HPC Clouds applied to Radiation Therapy
whileloop
Nika it consulting weekly update
CS205 Final project
Demonstrating a Pre-Exascale, Cost-Effective Multi-Cloud Environment for Scie...
Hadoop analytics provisioning based on a virtual infrastructure
Join ordering in fragment queries
Async JavaScript in ES7
Scaling metrics
Positronic Variables
AWS DEV DAY SEOUL 2017 Buliding Serverless Web App - 직방 Image Converter
Earthquake Updates and Enhancements to Processing for Hazus-MH 3.2
Illustrator_Sample
New dockets in
Ad

Viewers also liked (19)

PDF
How To Create Azure Database & Publish Website
PPTX
Post-Aquinas Options Eve - Support for Students
PPTX
Magtoapp. Print goes digital
PPTX
Take it home, apply design thinking
PDF
2559 project
PDF
Evolution of technology v1.0
PDF
4 the not so trivial pursuit of full alignment
PPTX
Corporate governance 1
PPTX
ภาษาไทย ป๖ คำสรรพนาม
PDF
Catalogo padroes organicos
PPTX
ตัวสะกด
ZIP
Presentacion en power_point_como_crear_un_blog
PPTX
Miley cyrusblog
PPS
The beauty of mathematics
PPTX
สุนทรียภาพ
PDF
Tomer dil-kursu
PPTX
たきざワッカソン 開会式
How To Create Azure Database & Publish Website
Post-Aquinas Options Eve - Support for Students
Magtoapp. Print goes digital
Take it home, apply design thinking
2559 project
Evolution of technology v1.0
4 the not so trivial pursuit of full alignment
Corporate governance 1
ภาษาไทย ป๖ คำสรรพนาม
Catalogo padroes organicos
ตัวสะกด
Presentacion en power_point_como_crear_un_blog
Miley cyrusblog
The beauty of mathematics
สุนทรียภาพ
Tomer dil-kursu
たきざワッカソン 開会式
Ad

Similar to Geocoding and Reverse Geocoding (20)

PPTX
097 smart devices-con_las_aplicaciones_de_gestión
PPTX
Windows Phone 8 - 15 Location and Maps
PDF
How to use geolocation in react native apps
PPTX
Develop a native application that uses GPS location.pptx
PDF
DIY Uber
PPTX
20220816-GeolocationAPI-AdvancedWebDevelopment.pptx
PPTX
Promises, promises, and then observables
PPTX
PPT
Mobile webapplication development
PPTX
Average- An android project
PDF
Battery Efficient Location Services
PDF
Creating an Uber Clone - Part XV.pdf
PDF
Processing 2.0 + Open Data
PDF
12.Maps and Location
PDF
Creating an Uber Clone - Part XV - Transcript.pdf
PDF
GNOME GeoClue - The Geolocation Service in Gnome
PDF
"Enabling Googley microservices with gRPC." at Devoxx France 2017
PDF
Famo.us: From Zero to UI
PDF
Core Location in iOS
PDF
"Enabling Googley microservices with gRPC" at JEEConf 2017
097 smart devices-con_las_aplicaciones_de_gestión
Windows Phone 8 - 15 Location and Maps
How to use geolocation in react native apps
Develop a native application that uses GPS location.pptx
DIY Uber
20220816-GeolocationAPI-AdvancedWebDevelopment.pptx
Promises, promises, and then observables
Mobile webapplication development
Average- An android project
Battery Efficient Location Services
Creating an Uber Clone - Part XV.pdf
Processing 2.0 + Open Data
12.Maps and Location
Creating an Uber Clone - Part XV - Transcript.pdf
GNOME GeoClue - The Geolocation Service in Gnome
"Enabling Googley microservices with gRPC." at Devoxx France 2017
Famo.us: From Zero to UI
Core Location in iOS
"Enabling Googley microservices with gRPC" at JEEConf 2017

More from Cheah Eng Soon (20)

PPTX
Microsoft Defender for Endpoint
PPTX
Azure Active Directory - Secure and Govern
PPTX
Microsoft Zero Trust
PPTX
MEM for OnPrem Environments
PPTX
Microsoft Threat Protection Automated Incident Response
PDF
Azure Penetration Testing
PDF
Azure Penetration Testing
PPTX
Microsoft Threat Protection Automated Incident Response Demo
PPTX
Microsoft Secure Score Demo
PPTX
Microsoft Cloud App Security Demo
PPTX
M365 Attack Simulation Demo
PPTX
Cloud Security Demo
PPTX
Azure Active Directory - External Identities Demo
PPTX
Azure WAF
PPTX
Azure Weekend 2020 Build Malaysia Bus Uncle Chatbot
PPTX
Microsoft Azure的20大常见安全漏洞与配置错误
PDF
20 common security vulnerabilities and misconfiguration in Azure
PPTX
Integrate Microsoft Graph with Azure Bot Services
PPTX
Azure Sentinel with Office 365
PPTX
3 Steps Integrate Microsoft Graph with Azure Bot Services
Microsoft Defender for Endpoint
Azure Active Directory - Secure and Govern
Microsoft Zero Trust
MEM for OnPrem Environments
Microsoft Threat Protection Automated Incident Response
Azure Penetration Testing
Azure Penetration Testing
Microsoft Threat Protection Automated Incident Response Demo
Microsoft Secure Score Demo
Microsoft Cloud App Security Demo
M365 Attack Simulation Demo
Cloud Security Demo
Azure Active Directory - External Identities Demo
Azure WAF
Azure Weekend 2020 Build Malaysia Bus Uncle Chatbot
Microsoft Azure的20大常见安全漏洞与配置错误
20 common security vulnerabilities and misconfiguration in Azure
Integrate Microsoft Graph with Azure Bot Services
Azure Sentinel with Office 365
3 Steps Integrate Microsoft Graph with Azure Bot Services

Recently uploaded (20)

PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Approach and Philosophy of On baking technology
PDF
Machine learning based COVID-19 study performance prediction
PPT
Teaching material agriculture food technology
PPTX
Cloud computing and distributed systems.
PDF
KodekX | Application Modernization Development
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Spectral efficient network and resource selection model in 5G networks
Approach and Philosophy of On baking technology
Machine learning based COVID-19 study performance prediction
Teaching material agriculture food technology
Cloud computing and distributed systems.
KodekX | Application Modernization Development
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Unlocking AI with Model Context Protocol (MCP)
Encapsulation_ Review paper, used for researhc scholars
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
The Rise and Fall of 3GPP – Time for a Sabbatical?
MIND Revenue Release Quarter 2 2025 Press Release
20250228 LYD VKU AI Blended-Learning.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
The AUB Centre for AI in Media Proposal.docx
Dropbox Q2 2025 Financial Results & Investor Presentation
How UI/UX Design Impacts User Retention in Mobile Apps.pdf

Geocoding and Reverse Geocoding

  • 1. Prepared by ENG SOON CHEAH Microsoft MVP 11/23/2015 Prepared by ENG SOON CHEAH
  • 2. 11/23/2015 Prepared by ENG SOON CHEAH
  • 3. Geolocator geolocator = new Geolocator(); // Define the accuracy for the location service in meters // There is no point to set the accuracy to any value below 5; // Also can define the location service accuracy in DesiredAccuracy with the options of Default or High geolocator.DesiredAccuracyInMeters = 10; Geoposition currentposition = await geolocator.GetGeopositionAsync( maximumAge: TimeSpan.FromMinutes(5), // to specify the aging of the cache timeout: TimeSpan.FromSeconds(10)); // to specify the timeout for the getting the location information // There is meaningless to obtaion the position value beyond 6 decimal points. // It will ONLY crate unncessary calculation. // // Obtain the position value from Coordinate.Point.Position, the information in .Coordinate is retiring. string latitude = currentposition.Coordinate.Point.Position.Latitude.ToString("0.000000"); string longitude = currentposition.Coordinate.Point.Position.Longitude.ToString("0.000000"); txtLocation.Text = latitude + "," + longitude; 11/23/2015 Prepared by ENG SOON CHEAH
  • 4. 11/23/2015 Prepared by ENG SOON CHEAH
  • 5. var geolocator = new Geolocator(); geolocator.DesiredAccuracyInMeters = 100; geolocator.DesiredAccuracy = PositionAccuracy.High; Geoposition position = await geolocator.GetGeopositionAsync(); // reverse geocoding BasicGeoposition myLocation = new BasicGeoposition { Longitude = position.Coordinate.Point.Position.Longitude, Latitude = position.Coordinate.Point.Position.Latitude }; Geopoint pointToReverseGeocode = new Geopoint(myLocation); MapLocationFinderResult result = await MapLocationFinder.FindLocationsAtAsync(pointToReverseGeocode); if (result.Status == MapLocationFinderStatus.Success) { if (result.Locations.Count != 0) { // here also it should be checked if there result isn't null and what to do in such a case string country = result.Locations[0].Address.FormattedAddress; txtLocation.Text += country.ToString(); } } 11/23/2015 Prepared by ENG SOON CHEAH
  • 6. This Result include Geocoding (Coordinates) and Reverse Geocoding 11/23/2015 Prepared by ENG SOON CHEAH
  • 7. • Microsoft Virtual Academy https://mva.microsoft.com/en-US/training-courses/a-developer- s-guide-to-windows-10-12618?l=o3HUevpRB_8105095281 • Channel 9 https://channel9.msdn.com/Series/Windows-10-development- for-absolute-beginners • GitHub https://github.com/cheahengsoon/ • SlideShare http://www.slideshare.net/cheahengsoon/ 11/23/2015 Prepared by ENG SOON CHEAH