We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

How to navigate to the user's current GeoLocation?

Platform: jQuery |
Control: ejMap

Navigating to the users 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 users 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

You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile