Local image for the marker icon on Cordoba / Calling Card Google Maps Plugin

Can I use local storage on my device as a marker icon? I can use the url and it works, but when I try to use a local image, it will not load. How should I link to an image? This is a multi-platform application, so I cannot use device-specific paths, such as Android file:///android:asset/

 map.addMarker({ 'position': new plugin.google.maps.LatLng(13.7579507,100.5643353), 'title': 'Fortune Town', 'icon': '../templates/icon2.png' }, function(marker) { marker.showInfoWindow(); }); 

I am using Ionic Framework (which uses AngularJS ) and Apache Cordova with the Google Maps plugin from https://github.com/wf9a5m75/phonegap-googlemaps-plugin/

+5
source share
2 answers

This doesn't make much sense, but this is what worked:

 'icon': 'www/templates/icon2.png' 
+12
source

Source: https://habr.com/ru/post/1205574/


All Articles