emp3-web
emp3-web copied to clipboard
Cannot call methods on the Features returned in the onSuccess callback of Map.addFeature and Map.addFeatures.
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}
);
}
});
}
});