John4930205
Posts: 0
Joined: Tue Aug 28, 2012 4:30 am

Building Google Map App with Geolocation

I followed this tutorial to setup google map geolocation:
http://help.gotiggr.com/getting-start...

But when I click on the marker, info window (popup) doesn't come up. I tried adding the Google API 3 InfoWindow function to the geolocation component, but the infowindow doesn't come up. Plz help!

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Building Google Map App with Geolocation

Did you check this option?

Image

John4930205
Posts: 0
Joined: Tue Aug 28, 2012 4:30 am

Building Google Map App with Geolocation

That option is for the standard marker that you set via marker properties, no? Geolocation service component displays another marker that doesn't allow me to click and display the info window.

Again, my geolocation setup is based on this tutorial: http://help.gotiggr.com/getting-start...

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Building Google Map App with Geolocation

Can you share the code that you used to add the info window?

John4930205
Posts: 0
Joined: Tue Aug 28, 2012 4:30 am

Building Google Map App with Geolocation

This is the code that I have on the geolocation component - Event (Success) - Run Custom Javascript, but not working...

Do I need to change "markerX" to something else?

--------------------------

var map = Tiggr('googlemap1');
map.options['address']='';
map.refresh();

var infowindow = new google.maps.InfoWindow();
//clicklistener
google.maps.event.addListener(markerX, 'click', function() {
infowindow.setContent('Marker #X');
infowindow.open(Tiggr("googlemap1").gmap, markerX);
});

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Building Google Map App with Geolocation

Instead of using Tiggzi(...) function to get the map, try to get the map div directly, like this:
var map = document.getElementById("map_div"),

John4930205
Posts: 0
Joined: Tue Aug 28, 2012 4:30 am

Building Google Map App with Geolocation

Thx Max, but I just can't get this work...

So I decided to go another route...

I would like to customize the marker for the geolocation. I used this code on the geolocation component - Event (Success) - Run Custom Javascript, but not working...

Do you have any advice on this? Thx.

--------------------------

var map = Tiggr('googlemap1');
map.options['address']='';
map.refresh();

var marker = new google.maps.Marker({
icon: 'http://www.example.com/images/custom-...',
title: "Testmarker"
});

Tiggr("googlemap1").options.mapElement.gmap('addMarker', marker);

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Building Google Map App with Geolocation

You should add InfoWindow to the marker: https://developers.google.com/maps/do...

Tooba Atif
Posts: 0
Joined: Fri Apr 04, 2014 3:07 am

Building Google Map App with Geolocation

I am using the below code on geolocation success. but its not working.

var map = Appery('GMaps');
map.setProperty('address','');
map.refresh();

var marker = new google.maps.Marker({
animation: google.maps.Animation.DROP,
title: "Location Found"
});

marker.setMap(map);

google.maps.event.addListener(marker, 'click', function() {
confirm('Do you want to add details for this house?');
});

I have disabled the 'Show marker' on the GMap but nothing is shown on the screen.
If I enable it then i was unable to click on marker using the above code.

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

Building Google Map App with Geolocation

Hi John,

Did you get it working?

Return to “Issues”