web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

how to get location in tablet web browser

(0) ShareShare
ReportReport
Posted on by 40

Hi,

I want to get location user when click the button. I can do this dynamics 365 app but want to do this using tablet web browser.How can I achieve this?Is there anyone who can help me about this?

Best Regards,

Akbulut

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    You can use Browser HTML 5 capabilities to get the Location

    www.w3schools.com/.../html5_geolocation.asp

    Your ribbon button or button in a webresource can take advantage of this browser feature.

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi,

    Please have a look below reference -

    [View:https://www.inogic.com/blog/2017/03/get-current-location-from-the-device-in-dynamics-365/]

  • Akbulut Profile Picture
    40 on at

    Hi Goutam,

    This works for dynamics 365 App but can't work for web browser.

    Thanks,

    Akbulut

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    Hi

    You will have to use Geo Location API in your javascript to get the location in the browser.

    All majors browsers support HTML 5 standard for Geo Location API, the following lines will give you the location

    navigator.geolocation.getCurrentPosition(function(location) {

     console.log(location.coords.latitude);

     console.log(location.coords.longitude);

     console.log(location.coords.accuracy);

    });

    Please see the links below to read more on the topic

    w3c.github.io/geolocation-api

    developer.mozilla.org/.../Geolocation_API

    stackoverflow.com/.../get-position-data-from-mobile-browser

    nishantrana.me/.../used-html-5-geolocation-api-with-bing-map

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans