Closed ThomasBiede closed 4 years ago
I suppose you have an issue with your resource path. I think you are using Ionic4, I am still on Ionic 3 and if I want my markers to be displayed I am using the following path for each platform as I have all my icons in the assets/mapicons directory:
export const MAPICONS_ROOT_ANDROID = 'http://localhost/assets/mapicons/'; export const MAPICONS_ROOT_IOS = 'www/assets/mapicons/'; export const MAPICONS_ROOT_BROWSER = 'assets/mapicons/';
I know it is a bit ugly but this is the only way it works for me for both debug and prod builds
Try ../
instead of .../
@battika thanks, your solution worked
I'm glad, don't ask me why it works :)
If it works don't fix it, i guess
I happened one of the refactor activities. This plugin supports many frameworks and as I saw in the code it mainly accepts Cordova developers to use CDV file path which I don't, and probably not too many Ionic developers do. Anyway, this seems to work and if something changes it is not to hard to adapt to the new situation.
I'm submitting a ... (check one with "x")
If you choose 'problem or bug report', please select OS: (check one with "x")
cordova information: (run
$> cordova plugin list
)If you use
@ionic-native/google-maps
, please tell the package.json (only@ionic-native/core
and@ionic-native/google-maps
are fine mostly)Current behavior: Marker is not rendering custom icons (.png) and instead shows the default icon of a google maps marker.
Expected behavior: Rednering my custom (.png) icon for the marker
Screen capture or video record:
Related code, data or error log (please format your code or data):