Custom marker of google maps is not displayed on Android

Hi, I have customized a marker of google maps but the image of the marker is not loaded on Android (it works on web browser).

var image = {
     url: '../img/myposition.png',
     size: new google.maps.Size(32, 32),
     origin: new google.maps.Point(0, 0),
     anchor: new google.maps.Point(10, 20)
var myMark = new google.maps.Marker({
     map: $,
     animation: google.maps.Animation.DROP,
     position: latLng,
     icon: image,

Console log:

06-30 09:30:38.969 25172-25233/com.ionicframework.emasa498394 E/AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/img/myposition.png

Permissions in AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />

I have added other images for other components using CSS and works fine on Android:

.signup-background {
    background: url(../img/back_app.png);

Any idea?


Try removing “…/” from the url i.e.
img/myposition.png just this