Jen5411892
Posts: 0
Joined: Tue Jan 08, 2013 3:13 pm

Geolocation confustion

Hello,
I am trying to create a map with a single point that finds the user's address and navigates (or gives directions) to the point.

I followed the tutorial about creating a Google map with Geolocation. I tested it and it works fine. It locates the user and also allows the user to input an address. However, it does not provide any options for the user to navigate (or get directions) to the point I input. The point shows up on the map, but when I click it the point disappears.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Geolocation confustion

Jen5411892
Posts: 0
Joined: Tue Jan 08, 2013 3:13 pm

Geolocation confustion

Thanks. Yes, it did help.
One problem: in the tutorial it says to drop a "panel component" in the grid next to the map to display the text directions. This looks like an older tutorial by the screenshots. I do not see a "panel component" in the current version. What can I substitute?

thank you.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Geolocation confustion

Hi Jennifer,

you can use 'HTML' component, place it into the grid and in this component insert this:
code
<div data-role="panel" id="panel">
<!-- panel content goes here -->
<&#47;div>
/code

follow the tutorial - it should work.

Jen5411892
Posts: 0
Joined: Tue Jan 08, 2013 3:13 pm

Geolocation confustion

The map is functioning fine, but the directions are blank. I think adding the html snippet for panel into the mix is messing me up. Can you please take a look at it? It's already shared with Appery. It's called ketersalon.

thank you.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Geolocation confustion

Hello!
1) On click on submit_directionsMap change the last who lines:
codevar panel = Appery("directionsPanelhtml")[0];
displayDirections(sourceAddress, destinationAddress, map, panel);/code
2) Inside HTML component delete code<div data-role="panel" id="panel">
<!-- panel content goes here -->
<&#47;div>/code

Jen5411892
Posts: 0
Joined: Tue Jan 08, 2013 3:13 pm

Geolocation confustion

Yay!! That worked. Thank you so much!

Jen5411892
Posts: 0
Joined: Tue Jan 08, 2013 3:13 pm

Geolocation confustion

One more question. I'd like to add a "show my location" to this map - I'm sort of combining the two tutorials now. How can I add that? Now that my directions are working I don't want to mess it up. :)

thank you

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Geolocation confustion

Before doing changes you can save project backup.
Follow this tutorial http://docs.appery.io/tutorials/build...

Jen5411892
Posts: 0
Joined: Tue Jan 08, 2013 3:13 pm

Geolocation confustion

No luck. I followed the tutorial explicitly. The line that is throwing me off is just after #10: "In addition to updating the component, you also need to set the address to a blank value."
My map has a set end point, so I can't very well reset the address to a blank value.

Return to “Issues”