Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

Title not showing in map

I need the title of the marker to show when the user clicks the marker on there phone. OR i need the title to always show. I have been trying for hours and read every post I can find on Appery support / internet. Here is the code I came up with:

The markers populate and the titles show when I mouse over but it does not work on my device.

I am execute the code on button click.

var list_location = localStorage.getItem('mysqlFireCompaniesArray');
var obj = JSON.parse(list_location);
var coordsArray = obj;
var marker;

for (var i = 0, j = coordsArray.length; i < j; i++) {
marker = new google.maps.Marker({
position: new google.maps.LatLng( coordsArray.Lat, coordsArray.Lon ),
title: coordsArray.Engine,

map: Appery("googlemap_6").gmap
});

}
var onMarkerClick = function(){
alert("Marker click");
};
//Where - markers - is your marker.
google.maps.event.addListener(marker, 'click', onMarkerClick);

Please help
Thank you
Vinny

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Title not showing in map

Hello,

Does it work, when you click on the marker, or it just works on the focus event?

Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

Title not showing in map

It doesn't work at all. It does work when testing in chrome when I hover the mouse over it. Buy it does not work on Android

Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

Title not showing in map

any ideas seems to be hot topic

Ravi Kumar Govindu
Posts: 0
Joined: Sun Aug 16, 2015 5:31 pm

Title not showing in map

probably , you can use InfoWindo when you click marker to show the popup, that is compatible for most browsers?
'
sample extract ...
var infowindow = new google.maps.InfoWindow();
var contentString1 = "Test InfoWIndow";
google.maps.event.addListener(marker, 'click', (function(
marker, contentString1, infowindow) {
return function() {
infowindow.setContent(contentString1);
infowindow.setPosition(markerLatLng);
infowindow.open(map, marker);
};
})(marker, contentString1, infowindow));

Let me know if it does help your question?

Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

Title not showing in map

thanks i got it to work..

Ravi Kumar Govindu
Posts: 0
Joined: Sun Aug 16, 2015 5:31 pm

Title not showing in map

You mean when you click marker? Does it show on iOS? Can share code if it is possible?

Vinny B
Posts: 0
Joined: Fri Aug 22, 2014 2:22 pm

Title not showing in map

I combined several codes to get it to work the way i need it to. I cannot get it to anything when I click a marker.

I explained what i did here

https://getsatisfaction.com/apperyio/...

Return to “Issues”