-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Labels
Description
Bug Report
I am adding markers with code like this:
const marker: Marker = {
coordinate: gasStation.location,
iconUrl: 'data:image/png;base64,...', // Base64 png url, tested and working with the js api, cordova plugin
iconSize: {
width: 38,
height: 48
},
}
const markerId = await nativeMap.addMarker(marker);
The image is ignored, I just get the standard marker icon.
Is this a known missing feature? By investigating, I was able to find some discussions regarding base64 svg icons but no direct confirmation that data urls are unsupported.
Can you please confirm?
Plugin(s)
@capacitor/google-maps
Capacitor Version
Latest Dependencies:
@capacitor/cli: 6.1.2
@capacitor/core: 6.1.2
@capacitor/android: 6.1.2
@capacitor/ios: 6.1.2
Installed Dependencies:
@capacitor/cli: 6.1.2
@capacitor/core: 6.1.2
@capacitor/android: 6.1.2
@capacitor/ios: 6.1.2
[success] iOS looking great! 👌
[success] Android looking great! 👌
Platform(s)
Android
IOS? (only tested on Android so far)
Current Behavior
Data urls are ignored when adding Markers.
Expected Behavior
A workaround or confirmation that this is expected.
Other Technical Details
The data url is exported from an HTML canvas like so:
// Export to base64 string
const ret = canvas.toDataURL('image/png');