Specifying marker URL doesn't work
Great plugin, thanks!
The README says I can specify custom marker icons with the URL of the image file, so I tried
const options = {
async: true,
polyline_options: { color: 'purple' },
startIcon: 'css/images/start-icon.png',
};
But it isn't working for me, even when I specify an absolute URL like
startIcon: 'http://localhost/nmhiking/css/images/start-icon.png',
endIcon: 'http://localhost/nmhiking/css/images/start-icon.png',
and verify that the URL works in a browser. The track still starts and ends with the default leaflet icon that's used for other markers. Am I misunderstanding the documentation? I know the options are getting processed because changing the color of the polyline works.
Also, could you clarify in the README what those wptIcons keys like 'Coffee shop' correspond to in a GPX file?I'm not sure what to make of "wptIcons and wptTypeIcons are mappings of waypoint symbols and types to the icon you want to use for each". What's a type? Can I add something like
Did you try specifying it within the markers parameter like this:
const options = {
async: true,
markers: {
startIcon: 'css/images/start-icon.png',
},
polyline_options: { color: 'purple' }
};