fix(map): fixes issue with invalid string length when options.styles is specified
MODIFY
www/Map.js
www/Map.js
@@ -119,7 +119,7 @@ Map.prototype.getMap = function(mapId, div, options) {
this.set('camera_tilt', options.camera.tilt);
}
}
- if (options.styles) {
+ if (utils.isArray(options.styles)) {
options.styles = JSON.stringify(options.styles);
}
args.push(options);
@@ -197,7 +197,7 @@ Map.prototype.setOptions = function(options) {
this.set('camera_tilt', options.camera.tilt);
}
}
- if (options.styles) {
+ if (utils.isArray(options.styles)) {
options.styles = JSON.stringify(options.styles);
}
exec(null, this.errorHandler, this.id, 'setOptions', [options]);

fix(map): fixes issue with invalid string length when options.styles is specified