Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Geolocation confustion

Hi Jennifer,

You can use a marker - don't clean the address line. Simply pass the coordinates from Geolocation service to a marker, not directly to map. You can find the marker directly in the Google Maps component mapping.

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

Geolocation confustion

Hi Katya. I did exactly that. The directions still function, however the "show my location" does not. Image

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

Geolocation confustion

Hello! Please add on geolocation service Success event the following code:
prevar lat = data.coords.latitude, lon = data.coords.longitude;
var myOptions = {
zoom :8,
center: new google.maps.LatLng(lat, lon),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map($('div[dsid="directionsMap"]').get(0), myOptions);
var sfLatlng = new google.maps.LatLng(lat, lon);
var marker = new google.maps.Marker({
position: sfLatlng,
map: map
});/pre

http://docs.appery.io/tutorials/addin...

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

Geolocation confustion

Hi Katya,
The "show my location" now works. However, when I test and click "show my location" and then "get directions", I get this error:
Image

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

Geolocation confustion

Please fill in start address.

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

Geolocation confustion

I'm sorry. I guess I wasn't very clear. I'd like two options for "get directions":

  1. from my location

  2. from defined address

    Image

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

Geolocation confustion

On button "get directions" you retrieve source address from Input source :
prevar sourceAddress = Appery("inputSource").val();/pre and when you click on "show my location" this field isn't filled in. You need to get address using coordinates and fill in with this address inputSource. This should help https://getsatisfaction.com/apperyio/...

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

Geolocation confustion

Is there a tutorial on reverse geolocating? I'm am so lost looking at all of those posts from the link you just sent me. :(

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Geolocation confustion

Hi Jennifer,

Unfortunately we do not have such tutorial. You can find all you need on the link above.

Return to “Issues”