Results 1 to 27 of 27

Thread: http://locationdetection.mobi/

  1. #1
    Senior Member andymoore's Avatar
    Join Date
    Aug 2008
    Posts
    1,612

    Default http://locationdetection.mobi/

    New! Freshly regged and developed.

    http://locationdetection.mobi/

    If you've not guessed my next micro project appears to be based around Location Detection.

    Please can I ask members to test on their devices and let me know if it worked and if it did how accurate was the info, did anything mess up and so on.

    In essence it uses your browsers geo location data, where available and permission is given, to make an AJAX request to a script on the back end, this then connects to Google and gets the data on your latitude and longitude, once it has the data it then refreshes the page to share what it knows.

    navigator.geolocation = brilliant!



    Download the code: http://locationdetection.mobi/?dl
    Last edited by andymoore; 08-18-2010 at 11:45 AM. Reason: Added link to download code
    Andy Moore
    i don't do tech / mobi anymore - why do something that annoys and stresses lol

    New: Most Minty Tooth Oil - GMO and fluoride free toothpaste alternative

    100% natural botanical extracts to whiten teeth, freshen breath and strengthen gums
    Used, recommended and sold by Harley Street private dentists

    My other websites:

    http://sellyoursongs.info/ - Sell Your Songs using Mobile Payments
    http://detectmobilebrowsers.mobi/ - Detect Mobile Browsers
    http://andymoore.info/m-commerce-php/ - M-Commerce PHP (sell stuff on the mobile web)
    http://locationdetection.mobi/ - Detect a mobile browser's latitude & longitude
    http://andymoore.info/mysql-lyrics-database/ - Half a million lyrics


  2. #2
    Senior Member noonoo1's Avatar
    Join Date
    Jul 2007
    Location
    Wales, UK
    Posts
    3,261

    Default

    It's perfect for me Andy !

    Llanbadarn fawr, Aberystwyth

    Awesome !

  3. #3
    Senior Member andymoore's Avatar
    Join Date
    Aug 2008
    Posts
    1,612

    Default

    Waaaaaaaaaahhhhhhh!

    Brilliant, thank you!
    Andy Moore
    i don't do tech / mobi anymore - why do something that annoys and stresses lol

    New: Most Minty Tooth Oil - GMO and fluoride free toothpaste alternative

    100% natural botanical extracts to whiten teeth, freshen breath and strengthen gums
    Used, recommended and sold by Harley Street private dentists

    My other websites:

    http://sellyoursongs.info/ - Sell Your Songs using Mobile Payments
    http://detectmobilebrowsers.mobi/ - Detect Mobile Browsers
    http://andymoore.info/m-commerce-php/ - M-Commerce PHP (sell stuff on the mobile web)
    http://locationdetection.mobi/ - Detect a mobile browser's latitude & longitude
    http://andymoore.info/mysql-lyrics-database/ - Half a million lyrics


  4. #4
    Administrator Andres Kello's Avatar
    Join Date
    Jun 2007
    Location
    Barcelona
    Posts
    3,548

    Default

    Just tried it on my iPhone and it worked absolutely perfectly:

    --------------------------
    Your are here: Calle del Marqués de Comillas, 21, 07660 Santanyí, Spain
    Street: Calle del Marqués de Comillas
    Town / City: Santanyí
    County / State: Balearic Isles
    Country: Spain
    Latitude: 39.36984191666666
    Longitude: 3.233284633333333
    --------------------------

    Does this only work on iPhones or will it also work on GPS-enabled Androids, Nokias, etc. ?
    My .mobi's: Dating.mobi | Dubai.mobi | Adult.mobi | Banking.mobi | Student.mobi | Call.mobi | Horoscope.mobi | Messenger.mobi | Classifieds.mobi | LiveTV.mobi

    Developed: Yup.mobi | Mobility
    | Why .mobi? | Banking | Vuelos | Airline Complaints | Random Site | Whois | Free Mobile Dating | Free Dictionary | Free Thesaurus | Horoscope | Astrology | Free Translation | Exchange Rates


  5. #5
    Senior Member andymoore's Avatar
    Join Date
    Aug 2008
    Posts
    1,612

    Default

    Thanks Andres!

    It should (unchecked) work on any browser that has support for navigator.geolocation so yes it should work on any GPS enabled modern browser.

    Your are here: 39-78 Market St, Loughborough, Leicestershire LE11 3, UK
    House Number: 39-78
    Street: Market St
    Town / City: Loughborough
    District / Region: Charnwood
    County / State: Leicestershire
    Country: United Kingdom
    Postcode: LE11 3


    That is almost too close for comfort!

    I just looked at where you are on the map and now feel urgh as I'm in an inland concrete metropolis....

    What possibilities does this open up?

    Party a rhetorical question, partly not....
    Andy Moore
    i don't do tech / mobi anymore - why do something that annoys and stresses lol

    New: Most Minty Tooth Oil - GMO and fluoride free toothpaste alternative

    100% natural botanical extracts to whiten teeth, freshen breath and strengthen gums
    Used, recommended and sold by Harley Street private dentists

    My other websites:

    http://sellyoursongs.info/ - Sell Your Songs using Mobile Payments
    http://detectmobilebrowsers.mobi/ - Detect Mobile Browsers
    http://andymoore.info/m-commerce-php/ - M-Commerce PHP (sell stuff on the mobile web)
    http://locationdetection.mobi/ - Detect a mobile browser's latitude & longitude
    http://andymoore.info/mysql-lyrics-database/ - Half a million lyrics


  6. #6
    Founding Member Scandiman's Avatar
    Join Date
    Jun 2007
    Location
    NorCal
    Posts
    9,538

    Default

    Very cool Andy. I map searched the address your site provided and it was off about a mile, but the phone knows my exact location based on the map marker. Is your service using the gps or the tower triangulation data?

    Tested on iphone 4

  7. #7
    Senior Member andymoore's Avatar
    Join Date
    Aug 2008
    Posts
    1,612

    Default

    Cool, thanks Scandiman

    A quote from W3 Geolocation API Specification:

    The Geolocation API defines a high-level interface to location information associated only with the device hosting the implementation, such as latitude and longitude. The API itself is agnostic of the underlying location information sources. Common sources of location information include Global Positioning System (GPS) and location inferred from network signals such as IP address, RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA cell IDs, as well as user input. No guarantee is given that the API returns the device's actual location.

    http://locationdetection.mobi/

    Still not looking like much yet but coming together, I'll be cleaning the JavaScript up, there's more actual content on the page including a list of what data it is possible to get back from Google once you've sent them the lat and long.

    The good news is I registered this domain a matter of hours ago and it appears both this page and my site are in the Gindex already:



    Andy Moore
    i don't do tech / mobi anymore - why do something that annoys and stresses lol

    New: Most Minty Tooth Oil - GMO and fluoride free toothpaste alternative

    100% natural botanical extracts to whiten teeth, freshen breath and strengthen gums
    Used, recommended and sold by Harley Street private dentists

    My other websites:

    http://sellyoursongs.info/ - Sell Your Songs using Mobile Payments
    http://detectmobilebrowsers.mobi/ - Detect Mobile Browsers
    http://andymoore.info/m-commerce-php/ - M-Commerce PHP (sell stuff on the mobile web)
    http://locationdetection.mobi/ - Detect a mobile browser's latitude & longitude
    http://andymoore.info/mysql-lyrics-database/ - Half a million lyrics


  8. #8
    Founding Member Scandiman's Avatar
    Join Date
    Jun 2007
    Location
    NorCal
    Posts
    9,538

    Default

    Quote Originally Posted by andymoore View Post
    Cool, thanks Scandiman

    A quote from W3 Geolocation API Specification:

    The Geolocation API defines a high-level interface to location information associated only with the device hosting the implementation, such as latitude and longitude. The API itself is agnostic of the underlying location information sources. Common sources of location information include Global Positioning System (GPS) and location inferred from network signals such as IP address, RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA cell IDs, as well as user input. No guarantee is given that the API returns the device's actual location.
    Thanks for clarifying that Andy. I sure wish this was a parameter in Device Atlas so I could offer it up to users accordingly (perhaps it is there but I'm not seeing it). Any idea on pre-screening a user to only offer this to compatible devices?

    BTW, rep+ now that I'm at my laptop
    Last edited by Scandiman; 08-16-2010 at 04:46 PM.

  9. #9
    Senior Member andymoore's Avatar
    Join Date
    Aug 2008
    Posts
    1,612

    Default

    Thanks!

    I've considered adding HTML5 detection to my mobile browsers script, now I'm doing this too I can see that being pushed higher up the list of things to do as they compliment each other nicely.

    As it is now I'm more concerned with getting the data from client side to server side, storing it and being able to use it on subsequent page views server side with ease.

    A few uses:

    • Estate Agents - show properties on that street, in that town or county
    • Find my nearest - multiple outlet retailers
    • Pre-propagation of form data
    • Local directories
    • Classified directories
    • Directories with addresses
    I could continue.

    Andy Moore
    i don't do tech / mobi anymore - why do something that annoys and stresses lol

    New: Most Minty Tooth Oil - GMO and fluoride free toothpaste alternative

    100% natural botanical extracts to whiten teeth, freshen breath and strengthen gums
    Used, recommended and sold by Harley Street private dentists

    My other websites:

    http://sellyoursongs.info/ - Sell Your Songs using Mobile Payments
    http://detectmobilebrowsers.mobi/ - Detect Mobile Browsers
    http://andymoore.info/m-commerce-php/ - M-Commerce PHP (sell stuff on the mobile web)
    http://locationdetection.mobi/ - Detect a mobile browser's latitude & longitude
    http://andymoore.info/mysql-lyrics-database/ - Half a million lyrics


  10. #10
    Senior Member andymoore's Avatar
    Join Date
    Aug 2008
    Posts
    1,612

    Default

    The style and design of the site is coming along nicely today:

    http://locationdetection.mobi/



    Hoping to be finished in a day or two complete with free download!
    Andy Moore
    i don't do tech / mobi anymore - why do something that annoys and stresses lol

    New: Most Minty Tooth Oil - GMO and fluoride free toothpaste alternative

    100% natural botanical extracts to whiten teeth, freshen breath and strengthen gums
    Used, recommended and sold by Harley Street private dentists

    My other websites:

    http://sellyoursongs.info/ - Sell Your Songs using Mobile Payments
    http://detectmobilebrowsers.mobi/ - Detect Mobile Browsers
    http://andymoore.info/m-commerce-php/ - M-Commerce PHP (sell stuff on the mobile web)
    http://locationdetection.mobi/ - Detect a mobile browser's latitude & longitude
    http://andymoore.info/mysql-lyrics-database/ - Half a million lyrics


  11. #11
    Mobility Regular
    Join Date
    Jun 2008
    Posts
    306

    Default

    This is really amazing! Looks like this is the first step away from native LBS apps?
    I’ve been waiting a long time for someone to make a post like this. Thanks.
    Is it possible to use PHP instead o Ajax to do this?

  12. #12
    Senior Member andymoore's Avatar
    Join Date
    Aug 2008
    Posts
    1,612

    Default

    It needs the JavaScript client side to send the values to php.

    Once you have it server side you can make it sing!

    Cheers

  13. #13
    Founding Member Scandiman's Avatar
    Join Date
    Jun 2007
    Location
    NorCal
    Posts
    9,538

    Default

    Quote Originally Posted by andymoore View Post
    The style and design of the site is coming along nicely today:

    http://locationdetection.mobi/



    Hoping to be finished in a day or two complete with free download!
    It's amazing what you can do in a little time Andy. Very cool indeed!

  14. #14
    Senior Member andymoore's Avatar
    Join Date
    Aug 2008
    Posts
    1,612

    Default

    Thanks but to be fair, all credit for the quick turnaround is thanks to what's out there already:

    http://www.3point7designs.com/blog/2...w-they-did-it/
    http://www.zenelements.com/blog/css3...unded-corners/
    http://code.almeros.com/how-to-creat...bled-tag-cloud
    http://www.tutorial9.net/resources/v...dia-icon-pack/

    That's the stuff that makes it look nice, I am really loving CSS3

    It was reading this page http://www.ip2location.com/html5geolocationapi.aspx that made the penny drop, the all important thing here is navigator.geolocation - if a browser supports that you can do voodoo!

    Andy Moore
    i don't do tech / mobi anymore - why do something that annoys and stresses lol

    New: Most Minty Tooth Oil - GMO and fluoride free toothpaste alternative

    100% natural botanical extracts to whiten teeth, freshen breath and strengthen gums
    Used, recommended and sold by Harley Street private dentists

    My other websites:

    http://sellyoursongs.info/ - Sell Your Songs using Mobile Payments
    http://detectmobilebrowsers.mobi/ - Detect Mobile Browsers
    http://andymoore.info/m-commerce-php/ - M-Commerce PHP (sell stuff on the mobile web)
    http://locationdetection.mobi/ - Detect a mobile browser's latitude & longitude
    http://andymoore.info/mysql-lyrics-database/ - Half a million lyrics


  15. #15
    First time poster!
    Join Date
    Nov 2010
    Posts
    1

    Default

    Andy I'm just beginning to mobilize my sites and I love this script! I want to purchase the license for use on up to 10 sites. But I have an etiquette question first and couldn't find your contact info anywhere. I design adult sites. Do you have any problem with your script being used on naughty sites?

  16. #16
    Senior Member noonoo1's Avatar
    Join Date
    Jul 2007
    Location
    Wales, UK
    Posts
    3,261

    Default

    Andy, am i able to do country location with this script so that i can offer different country pages?
    ENOUGH SAID


    Mobile Web Search, forget google, bookmark... JUST.mobi

    Snowboards.mobi | Convert2.mobi | Caravans for Sale | VOTES.mobi

  17. #17
    Senior Member andymoore's Avatar
    Join Date
    Aug 2008
    Posts
    1,612

    Default

    Quote Originally Posted by ANA Designs View Post
    Andy I'm just beginning to mobilize my sites and I love this script! I want to purchase the license for use on up to 10 sites. But I have an etiquette question first and couldn't find your contact info anywhere. I design adult sites. Do you have any problem with your script being used on naughty sites?
    I think you've got the location detection and mobile device detection sites mixed up, there's no license or fee to use the location detection so there are absolutely no restrictions, as for the device detection I don't have a problem with adult sites.

    As for not being able to find my contact details, my email is wrapped in the PayPal link and I'm happy to do a bulk license deal with you

    Quote Originally Posted by noonoo1 View Post
    Andy, am i able to do country location with this script so that i can offer different country pages?
    Yes you could use it for country detection but using something server side like Apache's mod_geoip would make more sense as it's server side and not client side.

    http://www.maxmind.com/app/mod_geoip

    I prefer that method of country detection to any others I've found.
    Andy Moore
    i don't do tech / mobi anymore - why do something that annoys and stresses lol

    New: Most Minty Tooth Oil - GMO and fluoride free toothpaste alternative

    100% natural botanical extracts to whiten teeth, freshen breath and strengthen gums
    Used, recommended and sold by Harley Street private dentists

    My other websites:

    http://sellyoursongs.info/ - Sell Your Songs using Mobile Payments
    http://detectmobilebrowsers.mobi/ - Detect Mobile Browsers
    http://andymoore.info/m-commerce-php/ - M-Commerce PHP (sell stuff on the mobile web)
    http://locationdetection.mobi/ - Detect a mobile browser's latitude & longitude
    http://andymoore.info/mysql-lyrics-database/ - Half a million lyrics


  18. #18
    Mobility Regular morency's Avatar
    Join Date
    Nov 2008
    Location
    23.8134710 , 44.3247600
    Posts
    213

    Default

    Andy ,
    In awstats is displayed the country top .. this means mod_geoip is installed on server , no ?
    Ok ..
    How can we show in a php file the country ?!
    I tried to see with print_r($_SERVER);
    [GEOIP_CONTINENT_CODE]
    [GEOIP_COUNTRY_CODE]
    [GEOIP_COUNTRY_NAME]
    This arrays dont display anything
    www.MobileSites.org Exchange your mobile traffic with other sites

  19. #19
    Senior Member andymoore's Avatar
    Join Date
    Aug 2008
    Posts
    1,612

    Default

    RTFM

    The answer is ten keystrokes away, "geoip php"

    http://www.maxmind.com/app/php

    $country_code = apache_note("GEOIP_COUNTRY_CODE");
    $country_name = apache_note("GEOIP_COUNTRY_NAME");
    Last edited by andymoore; 12-10-2010 at 01:47 PM.

  20. #20
    Senior Member GijsZePa's Avatar
    Join Date
    Jul 2007
    Location
    Nieuw-Vennep, The Netherlands
    Posts
    2,800

    Default

    Not working. Probably 10 km off

    (thanks to a proxy)

    Martin
    <signature police forced me to remove my image that was too large and had nothing to do with a mobi site >


    Autodisk.mobi - all dutch carspecs | Manage all your holiday accommodations with our online manager.

  21. #21
    Mobility Regular nombre's Avatar
    Join Date
    Jun 2007
    Location
    Victoria BC Canada
    Posts
    345

    Default

    worked for me on my ipod touch
    got my street and a small range of street address
    and i was right in the range ..
    good job
    this is what dot mobi was made for i think ....

    got my postcode wrong but that's a small thing

  22. #22
    New Member
    Join Date
    Aug 2011
    Posts
    3

    Default Problems with demo

    I am using IE 9.0.

    First I went to the locationdetection.mobi site and tried the demo. It found my EXACT location. Fantastic! Then I downloaded the geo code and tried it on a hosting server. Using Firefox I got an address that was in the same state (Washington) but about 100 miles away from my browser location. Then I tried the code using IE 9.0 and got a "rude" message that said that I needed to upgrade my browser---the same browser that found my EXACT location earlier!

    Huh?

  23. #23
    Senior Member noonoo1's Avatar
    Join Date
    Jul 2007
    Location
    Wales, UK
    Posts
    3,261

    Default

    Have a look at http://iBooker.mobi I use Andy's code in this site, see if it works on IE 9
    ENOUGH SAID


    Mobile Web Search, forget google, bookmark... JUST.mobi

    Snowboards.mobi | Convert2.mobi | Caravans for Sale | VOTES.mobi

  24. #24
    New Member
    Join Date
    Aug 2011
    Posts
    3

    Default Hmmm. Hard to say

    Quote Originally Posted by noonoo1 View Post
    Have a look at iBooker.mobi I use Andy's code in this site, see if it works on IE 9
    Well, I didn't get the "Update Browser" message but you don't tell me where you think I am so I don't know whether you are getting the right Lat/Long or not. Notice that I said that FF DID return an address but not the right one.

  25. #25
    Senior Member
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,615

    Default

    Blimey.... even with a home broadband connection it's only about 15miles off!

  26. #26
    New Member
    Join Date
    Aug 2011
    Posts
    3

    Default Still curious

    Quote Originally Posted by newdomainer View Post
    Blimey.... even with a home broadband connection it's only about 15miles off!
    I am still curious how his demo page NAILED my address; i.e., street and street number!

  27. #27
    First time poster!
    Join Date
    Apr 2013
    Posts
    1

    Default version

    Hi, I have been using
    locationdetection.mobi

    but it recently gave a 404 error on googleapis.com

    Here's the code from wikispeedia.org/speedlimit VIEW SOURCE

    thanks!
    jim

  28. #28
    First time poster!
    Join Date
    Nov 2015
    Posts
    0

    Default seems like a dead thread

    But since this is using google api, there will be a limit to free calls per month ?

    Or maybe not since it is not my api key?

  29. #29
    First time poster!
    Join Date
    Nov 2015
    Posts
    0

    Default bad therea

    DB error here after post

Similar Threads

  1. add your links to my sites http://www.mob21.com and http://www.casinos4mobile.com
    By htttp://www.mob21.com in forum Member Portfolios
    Replies: 0
    Last Post: 06-07-2009, 03:57 PM
  2. Replies: 4
    Last Post: 02-24-2009, 01:00 PM
  3. http://www.n2w.mobi
    By GijsZePa in forum New Developed .mobi's
    Replies: 4
    Last Post: 01-22-2009, 10:15 AM
  4. New to me... http://ngc.mobi
    By pcaero in forum New Developed .mobi's
    Replies: 3
    Last Post: 12-13-2008, 11:07 PM
  5. http://www.p-dd.mobi/
    By HipHop.mobi in forum News & Discussion
    Replies: 3
    Last Post: 07-08-2008, 02:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
A Yup.mobi Mobile Site
Mobile Dating