Hey everybody,
I was trying to translate the following sample from Legacy to AMD, but I ran into some issues:
This is the sample: Multiple Attribute Inspectors | ArcGIS API for JavaScript
This is how far I have gotten: JS Bin - Collaborative JavaScript Debugging
I have the following issues:
1) Doesn't matter what template I pick I get the question mark symbol. (Thanks to Robert this is fixed)
2) When I create a new feature it does not save the attributes I put in a field. (fixed this issue in the latest version)
3) I have also noticed that in both the sample and my translation, when you first create a feature, the popup box doesn't have the header with the X to close it.
Thanks!
Tim
Solved! Go to Solution.
Tim,
Here is that (line 4):
selectedTemplate.featureLayer.applyEdits([newGraphic], null, null, function () { templatePicker.clearSelection(); var screenPoint = map.toScreen(getInfoWindowPositionPoint(newGraphic)); map.infoWindow.setTitle("Edit Feature"); map.infoWindow.setContent(attInspector.domNode); map.infoWindow.resize(325, 185); map.infoWindow.show(screenPoint, map.getInfoWindowAnchor(screenPoint)); });
Tim,
I still can not figure out why but here is the two line I changed to get the graphic to have the correct symbol.
var newGraphic = new Graphic(geometry); newGraphic.setAttributes(newAttributes);
Thanks Robert, that does the trick.
So the only thing that is left is the pop-up box.
Tim,
Here is that (line 4):
selectedTemplate.featureLayer.applyEdits([newGraphic], null, null, function () { templatePicker.clearSelection(); var screenPoint = map.toScreen(getInfoWindowPositionPoint(newGraphic)); map.infoWindow.setTitle("Edit Feature"); map.infoWindow.setContent(attInspector.domNode); map.infoWindow.resize(325, 185); map.infoWindow.show(screenPoint, map.getInfoWindowAnchor(screenPoint)); });
Thank you Robert as always.