Navigating to the user’s GeoLocation can be achieved by getting the respective latitude and longitude of that location.
The following steps help you meet the requirement.
Step 1: Create a map sample and include necessary script files.
Step 2: By using the following snippet you can get the user’s current location as latitude and longitude, and based on this you can navigate to the specified location.
In the following code example is used the markerTemplate to denote the navigated location, based on respective latitude and longitude.
You can refer the following online documentation link for more details on using the markerTemplate.
Sample Location for Markers:
In the following example, you can see that the Chennai location with its corresponding latitude and longitude, as the current location and when you click the NavigateToCurrentLocation button, it starts to navigate to Chennai.
Figure 1: GeoLocation
This page will automatically be redirected to the sign-in page in 10 seconds.