Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

Tracking Location On Google Maps Via Smartphone


  • Please log in to reply
7 replies to this topic

#1 scouseflip

scouseflip

    HR 4

  • Active Members
  • PipPipPipPip
  • 201 posts
  • Location:North West, England

Posted 19 August 2010 - 03:18 AM

Hi All

I put together a website for a group of guys making a charity bike ride across the US in aid of a local charity for terminally ill children, and they want their friends etc to be able to track their progress through an embedded Google map on the site. I understand that this is possible but have been unable to find much in the way of documentation about it online. All that I can find is tracking your own location on s smart phone which does not help much...

Can anyone point me in the right direction please?

Thanks

Andy

#2 Mooro

Mooro

    HR 4

  • Active Members
  • PipPipPipPip
  • 157 posts
  • Location:Loughborough, Leicestershire

Posted 19 August 2010 - 04:12 AM

Hi Andy,

Funny you should mention this as I launched this two days ago: http://locationdetection.mobi/ it uses geolocation, html5 and javascript with a server side call to the Google maps API to reverse geocode the lat and long to actual data you can use like house number, street and town.

I'd suggest using the free code download there then the cyclists with smartphones can log on, get the lat and long, store that in a database then others will be able to track the progress.

Geolocation needs support for navigator.geolocation in the browser, most decent smart phones have this.

The download on that site includes geo.html a page with a div, geo.js which does the navigator.geolocation and ajax stuff and geo.php which sends the lat and long to Google.

This gives new meaning to local search: where's my nearest coffee shop? Downstairs! It is that accurate when using GPS info! You just need the data on the back end to work with.

All pretty simple, there should be enough code there to get you started.

Good luck!




#3 scouseflip

scouseflip

    HR 4

  • Active Members
  • PipPipPipPip
  • 201 posts
  • Location:North West, England

Posted 19 August 2010 - 09:45 AM

Thanks Mooro - Seems I had a stroke of luck with the timing there! Certainly more than enough to get me going I reckon...

What I'm specifically trying to do is track them in real time by using their Google Latitude code to pull in the lat/lon of their current location rather than logging their location at certain points, but storing their historic locations could also be really useful in plotting a map that shows not onlywhere they are but where they have been and when! I've downloaded the code thanks and I'll let you know how I get on.

cheers.gif

#4 Mooro

Mooro

    HR 4

  • Active Members
  • PipPipPipPip
  • 157 posts
  • Location:Loughborough, Leicestershire

Posted 19 August 2010 - 10:30 AM

Have a play changing getCurrentPosition to watchPosition - if I understand it right watching will send another callback to your function when it knows the position has changed.

Limitations with this method would be range and signal, keeping a constant state of state and so on.

The Geolocation API spec from W3 knows more than I ever will!
http://dev.w3.org/ge...pec-source.html

Isn't there a jogging / cycling style app that can track your run / cycle on a map, wouldn't that work? If a wheel has been invented once......

In my tests with that code it's either spot on to the point it's scary or out by about 200 meters. The difference I suppose between GPS and network triangulation.

#5 Catz

Catz

    HR 5

  • Active Members
  • PipPipPipPipPip
  • 447 posts

Posted 19 August 2010 - 09:19 PM

Maybe something like this is what you are looking for:

http://mytracks.appspot.com/

It records where you go using GPS and lets you upload a track to Google Maps.

#6 scouseflip

scouseflip

    HR 4

  • Active Members
  • PipPipPipPip
  • 201 posts
  • Location:North West, England

Posted 20 August 2010 - 02:59 AM

Thanks folks, 2 more useful links there! Think I have an idea how I'm going to approach this now. Just hope it it not too difficult because the ride begins in less than a fortnight!

#7 Catz

Catz

    HR 5

  • Active Members
  • PipPipPipPipPip
  • 447 posts

Posted 20 August 2010 - 11:27 PM

You'll have to let us know how it turns out. searchme.gif

#8 scouseflip

scouseflip

    HR 4

  • Active Members
  • PipPipPipPip
  • 201 posts
  • Location:North West, England

Posted 23 August 2010 - 08:36 AM

I will do!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

SPAM FREE FORUM!
 
If you are just registering to spam,
don't bother. You will be wasting your
time as your spam will never see the
light of day!