Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to get Current location of mobile no. entered in webpage using asp.net

Posted on 2012-08-21
4
Medium Priority
?
770 Views
Last Modified: 2012-09-21
Hello,

In my web application there is requirement of  find the current location of specified mobile no. i.e. current Longitude & Latitude

 how can i achieved this,

pls guide.

Thanks & Regards
0
Comment
Question by:citadelind
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
erik_nodland earned 1500 total points
ID: 38315610
Hi

You can use something like

function onPositionUpdate(position)
        {
            var lat = position.coords.latitude;
            var lng = position.coords.longitude;
            alert("Current position: " + lat + " " + lng);
        }
 
        if(navigator.geolocation)
            navigator.geolocation.getCurrentPosition(onPositionUpdate);
        else
            alert("navigator.geolocation is not available");


As of today, the W3C Geolocation API (widely associated with, though not technically part of, HTML 5) has support in the following major desktop browsers:
 •Firefox (since 3.5)
 •Safari (since 5.0)
•Google Chrome (version depends on OS)
 •Opera (since 10.60)
 •Internet Explorer (since IE 9)
 
There are at least two mobile browsers that implement the Geolocation API:
 •Safari Mobile (since iPhone OS 3.0)
 •Android (since at least Android 1.6)
 
On all of these platforms, you should be able to use navigator.geolocation.getCurrentPosition, etc.
0
 
LVL 61

Expert Comment

by:Julian Hansen
ID: 38315621
@erik_nodland as far as I am aware this is an opt in function - unless it has been enabled in the browser it won't work - or have things changed?
0
 

Author Comment

by:citadelind
ID: 38315639
My query is about i want to pass mobile no as argument  and application track its  current latitude,longitude
0
 
LVL 4

Expert Comment

by:erik_nodland
ID: 38315680
Ahh sorry I misunderstood your question. As fas as I know there is no way of tracking somebodies location just by knowing their mobile number. There are services around which allow you to send your location knowingly but nothing covertly.


thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question