Click marker doesn't work on iOS, custom marker icon doesn't show neither
See original GitHub issueHi,
On android it works, but I don’t know why on ios that tap/click doesn’t fire the function attached to the marker.
this.pits.forEach((item, index) => {
let a = new GoogleMapsLatLng(item.latitud, item.longitud);
let am: GoogleMapsMarkerOptions = {
position: a,
//icon:"www/assets/images/markers/map-marker-pit.png",
};
this.map.addMarker(am)
.then((marker: GoogleMapsMarker) => {
console.log('adding pit marker');
marker.addEventListener(GoogleMapsEvent.MARKER_CLICK)
.subscribe(e => {
console.log('you hit a pit marker');
this.openPageContenido(item);
});
});
});
openPageContenido(pit:any){
console.log('OPENPAGECONTENIDO');
let cl= new ContenidoList(pit.id,pit.nombre,"");
this.navCtrl.push( ContenidoPage, {"contenidoList": cl});
}
So running “ionic run ios -lc” I can see for each marker -> adding pit marker And the map shows all the markers, but If I tap one of them, there is no console log nor openPageContenido is fired.
Any idea?
Btw, I had to add:
.nav-decor{
display:none!important;
}
In order to be able to see he map, because otherwise a black screen is over the map. And I don’t know why, my custom markers are not displayed, I tried with different urls but no one worked. Meanwhile I leave them without my custom icon.
I’m using de v2 because in ios I couldn’t install the v1 (https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1436)
Issue Analytics
- State:
- Created 6 years ago
- Comments:27 (9 by maintainers)
Top Results From Across the Web
Google Maps API v3: custom markers not clickable on mobile ...
I've narrowed it down to our custom markers. If I remove the code that loads our custom marker images using new google.maps.MarkerImage() ,...
Read more >GoogleMaps Marker Click doesn't work on IOS - Ionic Forum
I'm using cordova google maps plugin to show native maps. In those maps, I put some markers, and if you tap/click one of...
Read more >Markers | Maps SDK for Android - Google Developers
Markers indicate single locations on the map. You can customize your markers by changing the default color, or replacing the marker icon with...
Read more >Google Map, Google Places, custom marker tutorial for iOS in ...
In this video I am gonna show you how to integrate Google map and google places in your app with Cocoapods, how to...
Read more >Google Map with Custom Marker | Flutter - YouTube
Let's add Google Maps to your Flutter app and replace the boring marker with a fancy one.The first step is getting an API...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Bit late but… This is probably what you’re looking for, works for me.
@ferminako Please use three-backslashes to show your code.