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: Using HTML5 Geo Location Behaviors

In this tutorial we will show you how to use the behaviors, built into HTML5 Geo Location in order to notify your users when there is a problem getting their location, using also HTML5 Responsive Notify.
*You can also check out the video.

How to do it

  1. We've already built a simple page that shows user's geolocation coordinates. Open the HTML5 Geo Location dialog, by clicking on its icon (1) and open behaviors (2).

  1. You can see that there is a list of available events as well as usage help for each of them. We select "When Permission denied" (1). This event triggers the selected behavior when users deny sharing their current location.  Now we are going to setup a notification, showing an error message when the permission to share location is denied. Select the control HTML5 Responsive Notify behavior (2) from the behaviors list and add it (3).

  1. In the control HTML5 Responsive Notify window, we enter a title for this notification (1) and a message that will be displayed within the responsive notify when the user denies sharing his location (2). You can enter a custom error message or you can use the ##message## mask in order to display the default error message. We use the ##message## mask for our tutorial and select the notify type error (3). When you're done, click Ok to add the behavior (4).

  1. Now, you can save your work and preview the results. When the page loads in your browser a dialog box asks if you want to share your current location. We select not to share our location and the HTML5 responsive notify alerts that the user prevented this page from retrieving a location. That's how easy it is to use the behaviors built into HTML5 Geo Location in order to notify your users when there is a problem getting their location.

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.