From the course: Apache Cordova: Building Cross-Platform Mobile Apps

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Show location

Show location - Apache Cordova Tutorial

From the course: Apache Cordova: Building Cross-Platform Mobile Apps

Start my 1-month free trial

Show location

- [Instructor] In the getCurrentPosition success callback, we pointed to the showParkingLocation function. The showParkingLocation function is where you'll display the location using the Google Maps JavaScript API. Let's add the showParkingLocation function to the script. Start with the function declaration. The first thing to do is to hide both the directions and the instructions if they are visible. So I'll make a call to the function we wrote previously called setCss and I'll pass in first the directions and I'll set the visibility property to hidden. Then I'll make another call to setCss and this time if the instructions are visible, I'll want to set the display property to none. Don't be tempted to use the visibility property of the instructions. Setting the visibility to hidden forces the browser to lay out space for the div. We don't that, as if that happened then the directions and the map would be below where the instructions were. Next we're going to create a Lat Long…

Contents