HTML5 Geo Location Manual

Learn how to work with HTML5 Geo Location extension

In this article you'll find the necessary information you'll need in order to learn how to work with HTML5 Geo Location extension.It features basic as well as advanced tutorials, also available in video format. We covered everything from enabling HTML5 Geo Location on a page to using HTML5 Geo Location behaviors and displaying visitors location information. If you still need any help with the extension, please contact us via Live support or the extension forums.


Advanced: Get Your Current Location Or Track Your Location

In this tutorial we will show you how to get your current location or track your location, using HTML5 Geo Location.
*You can also check out the video.

How to do it

  1. We added a simple table that displays the latitude, longitude and location accuracy bindings. You already know how to do this as we've already explained it in our previous tutorial. We also added three buttons on our page that we will use to get current location, start location tracking, and stop tracking. First, we need to change the default timeout and maximum age settings.

  1. First, we need to change the default timeout and maximum age settings. We change the timeout to 10 sec (1) and the maximum age to 2 sec (2), this way our location will be reported every 2 sec. Click the OK button to save the new values (3).

  1. Now, select "get current location" button (1), open the new behavior menu (2) and select control HTML5 Geo Location.

  1. In the control HTML5 Geo Location window we select get current position from the actions list (1) and click the OK button in order to apply the action (2).

  1. Make sure, that this behavior is properly attached to On Click event. We do the same with the other two buttons. You just need to select the proper action for each of them.

  1. Now we can preview the results. You can see that, when we click the start tracking button our location starts to update on every two seconds.  If we move, our device receives new coordinates and you can see this in the current location table. You can stop tracking, by clicking the stop tracking button.

Lubov Cholakova

Lubov CholakovaLubov has been with DMXzone for 8 years now, contributing to the Content and Sales departments. She is bringing high quality content in the form of daily blog updates, reviews, tutorials, news, newsletters,update emails and extensions' manuals. If you have a product that needs publicity or any other questions about the entire DMXzone community, she is the one you can contact.

See All Postings From Lubov Cholakova >>

Comments

Be the first to write a comment

You must me logged in to write a comment.