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

Posted on 2012-08-21
Last Modified: 2012-09-21

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
Question by:citadelind
    LVL 4

    Accepted Solution


    You can use something like

    function onPositionUpdate(position)
                var lat = position.coords.latitude;
                var lng = position.coords.longitude;
                alert("Current position: " + lat + " " + lng);
                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.
    LVL 49

    Expert Comment

    by:Julian Hansen
    @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?

    Author Comment

    My query is about i want to pass mobile no as argument  and application track its  current latitude,longitude
    LVL 4

    Expert Comment

    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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
    ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now