I tried to change the icon of mapMarkers but it corresponds to the list description and not to the markers themselves. This line displays a map with red markers :
component.set('v.mapMarkers', response.getReturnValue());
Whenever I try to change their icon, that's not working anymore :
var image = '{!URLFOR($Resource.MapMarkers, \'2.png\')}';
component.set('v.mapMarkers', {
location: response.getReturnValue(),
icon: image
});
I also tried this : http://releasenotes.docs.salesforce.com/en-us/summer15/release-notes/rn_vf_maps_enhancements_custom_icons.htm?edition=&impact=
Any idea ?
That looks like Aura component? Or is it Visualforce? Or Lightning Web Component?
For Aura: https://developer.salesforce.com/docs/component-library/bundle/lightning:map/documentation Search on this page for icon: 'standard:account'
You can't load your own icon, you're limited to icons defined in Lightning Design System . The format is category:icon_name
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.