Page 1 of 1

Title not showing in map

Posted: Fri Aug 14, 2015 4:38 am
by Vinny B

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


Title not showing in map

Posted: Sat Aug 15, 2015 4:10 pm
by Serhii Kulibaba

Hello,

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


Title not showing in map

Posted: Sat Aug 15, 2015 4:38 pm
by Vinny B

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


Title not showing in map

Posted: Sun Aug 16, 2015 12:32 pm
by Vinny B

any ideas seems to be hot topic


Title not showing in map

Posted: Sun Aug 16, 2015 5:43 pm
by Ravi Kumar Govindu

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?


Title not showing in map

Posted: Sun Aug 16, 2015 9:55 pm
by Vinny B

thanks i got it to work..


Title not showing in map

Posted: Sun Aug 16, 2015 11:50 pm
by Ravi Kumar Govindu

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


Title not showing in map

Posted: Mon Aug 17, 2015 12:37 am
by Vinny B

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/...