emp3-web icon indicating copy to clipboard operation
emp3-web copied to clipboard

Cannot call methods on the Features returned in the onSuccess callback of Map.addFeature and Map.addFeatures.

Open sjpinizzotto opened this issue 9 years ago • 3 comments

Run this script:

var feature1 = new emp3.api.MilStdSymbol({
  geoId: 'myPath',
  name: 'myPath',
  positions: [
    {latitude: 40, longitude: 40},
    {latitude: 41, longitude: 41}
  ],
  symbolCode: 'GFGPGLB----K--X'
});

var overlay1 = new emp3.api.Overlay(
  {geoId: 'overlay1', name: 'overlay1'}
);

map0.addOverlay({
  overlay: overlay1,
  onSuccess: function() {
    overlay1.addFeatures({
      features: [feature1],
      onSuccess: function() {
        map0.editFeature(
          {feature: feature1}
        );
      }
    });
  }
});

sjpinizzotto avatar Feb 03 '17 15:02 sjpinizzotto

@sjpinizzotto I cannot replicate this in Cesium, WorldWind and Leaflet seem to be having issues however.

jaybarra avatar Feb 27 '17 18:02 jaybarra

Could not replicate issue in Cesium or Worldwind. Leaflet is still having issues.

erikamarie avatar Mar 14 '17 17:03 erikamarie

@nclark25 Leaflet is throwing error in "mergeGeoJSONProperties" function of leaflet-eng.utils.geoJson.js on JSON that Cesium and Worldwind handle just fine.

"message":"this.options is undefined", "file":"http://localhost:3000/src/mapengine/leaflet/js/utils/leaflet-eng.utils.geoJson.js", "line":227, "column":21,

erikamarie avatar Mar 15 '17 16:03 erikamarie