Marcel GJS
Marcel GJS

Reputation: 234

ol.format.GeoJSON in ADVANCED_COMPILED mode failed

By ADVANCED_COMPILED mode of closure compiler is in method ol.format.GeoJSON.prototype.readFeaturesFromObject variable geoJSONFeatures undefined, compiler rename key of geojson object features -> UNDEFINED.

Better to use:

var geoJSONFeatures = geoJSONFeatureCollection["features"];

Upvotes: 0

Views: 80

Answers (1)

bartvde
bartvde

Reputation: 2126

Copying Eric Lemoine's reply from the mailing list here:

Do you use the geojson.js externs file we have in the ol3 repo? Using this file as an externs file should prevent renaming.

Upvotes: 1

Related Questions