У меня есть несколько веб-страниц на моем сайте, например, на следующем, который имеет раздел Локальная зона, здесь вы можете выбрать отображение местных достопримечательностей / магазинов / спортзала и т. Д. c, в браузере, когда вы наводите курсор мыши на эти иконки, они открываются. информационный пузырь, но на iPad или iPhone, когда вы нажимаете, они не показывают, что:
вот как я добавил слушателя события:
developmentIcon = new google.maps.MarkerImage(thisMapData.ICON[placeInt].toLowerCase(), new google.maps.Size(67, 77), new google.maps.Point(0, 0));
var placeLoc = new google.maps.LatLng(thisMapData.LAT[placeInt], thisMapData.LONGI[placeInt]);
marker = new google.maps.Marker({
map: map,
position: placeLoc,
devTitle: thisMapData.BESTLINKTEXT[placeInt],
icon: developmentIcon,
devURL: thisMapData.FRIENDLYURL[placeInt],
division: thisMapData.DIVISION[placeInt],
label: '',
devIntroText: thisMapData.DEVINTROTEXT[placeInt],
devHeading: thisMapData.DEVHEADING[placeInt],
devStatus: thisMapData.DEVSTATUS[placeInt],
devPriceRange: thisMapData.PRICERANGE[placeInt],
devCostText: '',
devImage: thisMapData.DEVIMAGE[placeInt],
devLogo: thisMapData.DEVLOGO[placeInt],
commercialType: thisMapData.COMMERCIALTYPE[placeInt],
helpToBuy: thisMapData.HELPTOBUY[placeInt]
});
google.maps.event.addListener(marker, 'click', markerListener );
mapBounds.extend(placeLoc);
markerCount++;
markers.push( marker );
function markerListener() {
this.map.panTo(this.position);
if ( this.devStatus === 'Available' ) {
/*check if Prices or Prices from is in the text */
this.devCostText = ( this.devPriceRange.toLowerCase().search('prices') >= 0 ) ? this.devPriceRange : 'Prices from ' + this.devPriceRange;
} else {
this.devCostText = this.devStatus;
}
infoboxContent = "<div class='mapPopup'>";
infoboxContent += "<a href='" + this.devURL + "'>";
if ( this.helpToBuy === 1 ) {
infoboxContent += "<div class='htb-banner-wrapper'>";
}
infoboxContent += "<img src='" + this.devLogo + "' style='float: left; width: 41.5%;' />";
infoboxContent += "<img src='" + this.devImage + "' style='float: left; width: 58.5%;' />";
if ( this.helpToBuy === 1 ) {
infoboxContent += "<div class='htb-banner'>Help to Buy available</div>";
infoboxContent += "</div>";
}
infoboxContent += "<div class='subtext'>";
infoboxContent += "<p class='location'>" + this.devHeading + "</p>";
infoboxContent += "<p class='prices " + this.devStatus.toLowerCase() + "'>" + this.devCostText + "</p>";
infoboxContent += "</div>";
infoboxContent += "<div class='arrow'><span class='icon'>" + app.mhpNextIcon + "</span></div>";
infoboxContent += "</a></div>";
infobox = new InfoBox({ latlng: this.position, map: this.map });
}
Не могли бы вы помочь Решение на этом посту не работает Маркер карты Google не отображает информационный пузырь на iPhone / iPad