Help get this topic noticed by sharing it on Twitter, Facebook, or email.

gmap title not showing in app but shows in desktop

Hello

My below code shows the marker in the map BUT DOES NOT show the title.

var map = Appery("googlemap_3").gmap;

// B1481 - 10th Ave & 50th St
var sfLatlng = new google.maps.LatLng(40.63847,-73.99933);
var marker = new google.maps.Marker({
position: sfLatlng,
map: map,
title: "B1481 - 10th Ave & 50th St",
icon: "../img/Fire_Marker_Red.png"
});

If I open the app in a browser and place the mouse of the marker the title will appear



But in he app if i push on the marker with my finger the title DOES NOT Appear.

Any Ideas on how to get the title to appear in APP?
1 person has
this question
+1
Reply
  • Hello Vinny,

    1. Please create a new JS file (Create New -> JavaScript) with the following JS code
    var map;
    var markers = [];
    var group;
    var bounds = new google.maps.LatLngBounds();

    function initialize() {
    map = Apperyio("googlemap").gmap;

    if (!map){
    setDelay();
    }
    }

    function showMarkers(newMarkers){
    markers = [];

    for (var i = 0; i < newMarkers.length; i++){
    var marker = new google.maps.Marker({
    position: {lat: newMarkers[i].lat, lng: newMarkers[i].lng},
    map: map,
    title: newMarkers[i].title
    });
    markers.push(marker);
    bounds.extend(marker.getPosition());
    }
    map.fitBounds(bounds);

    }

    function setDelay()
    {
    setTimeout(initialize, 50);
    }


    2. Run the JS code
    initialize();
    on the page show event

    3. ANd add another code to the button's click event or any another you want to display markers:
    var markers = [
    {lat: 52.520007, lng:13.404954, title: "A title"},
    {lat: 51.507351, lng:-0.127758, title: "B title"},
    {lat: 37.774929, lng:-122.419416, title: "C title"},
    {lat: 35.689487, lng:139.691706, title: "D title"}
    ];
    showMarkers(markers);
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited kidding, amused, unsure, silly