Jump to content
Sign In to follow this  
zombie615

HTML5 Geolocation

12 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 
<!-- I was reading up on the new elements that HMTL5 has introduced since I haven't
done any coding for years an this caught me a little off guard.

A script that you can input into your HTML5 coding an easily acquire the exact
location of a person down do the very last coordinate.-->

<script>
var x = document.getElementById("demo");
function getLocation()
  {
  if (navigator.geolocation)
    {
    navigator.geolocation.getCurrentPosition(showPosition);
    }
  else{x.innerHTML = "Geolocation is not supported by this browser.";}
  }
 function showPosition(position)
  {
  x.innerHTML = "Latitude: " + position.coords.latitude + 
  "<br>Longitude: " + position.coords.longitude; 
  }
</script>

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

I don't see any way to find anyone who isn't broadcasting his location using a GPS locator.  So how is this supposed to work?


Beware: Emancipated user.  No Windoze for me.
The teacher opens the door but the student must enter himself. - Ancient Chinese Saying

Every minute of hate in which one indulges oneself is sixty seconds of happiness lost.
Music expresses that which cannot be put into words and that which cannot remain silent. -- Victor Hugo
If you always do what you've always done, you'll mostly get what you've always got.
JohnNewSig.gif
"We have met the enemy, and he is us" - Walt Kelly

Come join us at the Moose Factory

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    http://www.w3schools.com/html/html5_geolocation.asp I'm running windows 8.1 with the latest updates for security so this may work differently for others I don't know. All I know is go to the site above an with the click of a button it gives the script encoded in the page with HTML permission to locate your exact location using google maps. Plus, without even using google maps it can still post your coordinates in plain text. That enough is alone for someone to find out exactly where you are in the world down to your very home address. 

     

    Honestly I don't know javascript but I'm reading up on all the basic web design stuff so I can get back into doing that kind of stuff. Though I assume it uses your ISP or something. It does however need adequate permission to do so. My thinking is that someone good enough with javascript can simply trick you into pressing it an sending your location information into their database or email it to them, I don't know.

     

    I know locating someone is no new thing. I was just questioning how easy it is now with this HTML5 an very little knowledge of javascript to be able to locate someone.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I don't think you need to worry too much. If you don't give permission for your location to be known it doesn't get sent, and if you do it doesn't necessarily give correct or meaningful information, the map it showed me certainly wasn't where I live. On a mobile phone (cellphone) you can turn off GPS

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I want to figure out these things you do here! I can't do code or anything, I think I should learn though.


    Come into chat and say hi!

    yKa6TtF.jpg

    "Simtropolis Forum Gamer, City Journal Lover, Cities XL Lover, and Off Topic Muncher"

    AVIATION AND FOOTBALL IS LIFE

    "Get high on aviation, not drugs!"

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    If you want to become a computer programmer, pay attention to your logic and mathematics.  Programming is simply making a cohesive list of instructions for a machine.  However, a program can be any list including the menu for a restaurant.


    Beware: Emancipated user.  No Windoze for me.
    The teacher opens the door but the student must enter himself. - Ancient Chinese Saying

    Every minute of hate in which one indulges oneself is sixty seconds of happiness lost.
    Music expresses that which cannot be put into words and that which cannot remain silent. -- Victor Hugo
    If you always do what you've always done, you'll mostly get what you've always got.
    JohnNewSig.gif
    "We have met the enemy, and he is us" - Walt Kelly

    Come join us at the Moose Factory

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Well when I was younger (around 15 years old) I used to be all into this Web Design an Computer Programming thing. Seemed to come so easily back than. Now I'm just like lost in space. I keep trying but its just getting annoying that I seem to be so confused when I feel like I shouldn't be. This stuff is so simple yet I take it in a complex subject of which a college degree is need to understand. SMH

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Aw c'mon.  Programming is easy.  What does this do:

     

     

    #include <stdio.h>

     

    int main (int argc, char * argv[ ]) {

    if (argc > 1) {

    int i;

     

    for (i = 0; i < argc; ++i) {

    printf( "Argument # ", %i, " =  ", %s, "\n", i, argv);

    }

    }

    return 0;

    }

     

    A simple little C program.


    Beware: Emancipated user.  No Windoze for me.
    The teacher opens the door but the student must enter himself. - Ancient Chinese Saying

    Every minute of hate in which one indulges oneself is sixty seconds of happiness lost.
    Music expresses that which cannot be put into words and that which cannot remain silent. -- Victor Hugo
    If you always do what you've always done, you'll mostly get what you've always got.
    JohnNewSig.gif
    "We have met the enemy, and he is us" - Walt Kelly

    Come join us at the Moose Factory

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    c is a a very useful language for many purposes, but introducing it when the original poster needs to get his head round Javascript and any add-ons to that and how to integrate that with HTML5 and CSS3 may confuse rather help. He is working through the right website: w3schools is very good for both self teaching and reference. 

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Maybe, but programmers tend to be polyglot.  The big deal about C is that it is practically an assembler without having to know much about the target machine.


    Beware: Emancipated user.  No Windoze for me.
    The teacher opens the door but the student must enter himself. - Ancient Chinese Saying

    Every minute of hate in which one indulges oneself is sixty seconds of happiness lost.
    Music expresses that which cannot be put into words and that which cannot remain silent. -- Victor Hugo
    If you always do what you've always done, you'll mostly get what you've always got.
    JohnNewSig.gif
    "We have met the enemy, and he is us" - Walt Kelly

    Come join us at the Moose Factory

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I don't see any way to find anyone who isn't broadcasting his location using a GPS locator.  So how is this supposed to work?

     

    GPS is the obvious way, but the almighty Google has found an even more ingenious way using the power of their data-mining apparatus: they have compiled a massive database of the location of WiFi networks all over the world and can tell where you are with very good precision based on which WiFi networks are being detected by the device you are using. Since the information used is all publicly accessible (a router broadcasts its unique MAC address to every device in range, all you need is access to a large enough network of devices which have GPS and WiFi simultaneously enabled that can collect this data - like Street View cars, and people's Android phones), the only way to thwart this is to turn WiFi off and use a wired connection.


    If you always take the same road, you will never see anything new.
    If you can read this, you deserve a cookie.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Google is starting to look like a try at world dominance.  I don't use any devices that can be detected by WiFi.  How does Google differ from Sky-Net?


    Beware: Emancipated user.  No Windoze for me.
    The teacher opens the door but the student must enter himself. - Ancient Chinese Saying

    Every minute of hate in which one indulges oneself is sixty seconds of happiness lost.
    Music expresses that which cannot be put into words and that which cannot remain silent. -- Victor Hugo
    If you always do what you've always done, you'll mostly get what you've always got.
    JohnNewSig.gif
    "We have met the enemy, and he is us" - Walt Kelly

    Come join us at the Moose Factory

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account

    Sign In to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections