Fix: can't load marker image
MODIFY
www/Map.js
www/Map.js
@@ -1335,10 +1335,24 @@ Map.prototype.addMarker = function(markerOptions, callback) {
// Generate a makrer instance at once.
//------------------------------------
markerOptions.icon = markerOptions.icon || {};
- if (typeof markerOptions.icon === 'string' || Array.isArray(markerOptions.icon)) {
- markerOptions.icon = {
- url: markerOptions.icon
- };
+ if (typeof markerOptions.icon === 'string') {
+ if (markerOptions.icon.indexOf("://") === -1 &&
+ markerOptions.icon.indexOf(".") === 0) {
+
+ var link = document.createElement('a');
+ link.href = markerOptions.icon;
+ markerOptions.icon = link.protocol+'//'+link.host+link.pathname + link.search;
+ link = undefined;
+ }
+ } else if (typeof markerOptions.icon.url === 'string') {
+ if (markerOptions.icon.url.indexOf("://") === -1 &&
+ markerOptions.icon.url.indexOf(".") === 0) {
+
+ var link = document.createElement('a');
+ link.href = markerOptions.icon.url;
+ markerOptions.icon.url = link.protocol+'//'+link.host+link.pathname + link.search;
+ link = undefined;
+ }
}
var marker = new Marker(self, markerOptions, exec);

Fix: can't load marker image