|
POST
|
So, using your post as info, we did the following: Manually encoded the simple marks quotation in the setDefinitionExpression call. In the proxy.ashx Replaced "%2527" with a simple mark quotation ' The api encoded the "%" character, production "%2527" We did this in the uri if it was a GET request We did this in the post body if it was a POST request You have to convert the post body to a string, do the replacement, and convert it back to a byte array. This prevented the response error.
... View more
07-09-2014
02:17 PM
|
0
|
0
|
767
|
|
POST
|
I am using the ArcGIS JavaScript API v. 3.7. I am trying snap to geometries in a certain layer as the mouse moves on the map. I am trying to do so without activating the Edit Toolbar or the Draw Toolbar. My call to map.snappingManager.getSnappingPoint() returns a point but it is the same screen point as the screen point passed in. Any ideas to help me? Here is my code for map ??? on-load event: self.mapVm.map.snappingManager.destroy(); self.mapVm.map.snappingManager = new snappingManager({ map: self.mapVm.map, layerInfos: [{ layer: self.parentVm.fieldEditLayer, snapToEdge: false }], tolerance: 50 }); Here is my code for map ??? mouse-move event: if (evt.ctrlKey) { // SnapPoint var currentScreenPoint = self.mapVm.map.toScreen(evt.mapPoint); self.mapVm.map.snappingManager.getSnappingPoint(currentScreenPoint).then(function (value) { if (value !== undefined) { snapPoint = value; snapPoint.setSpatialReference(new spatialReference({ wkid: 102100 })); var snapScreenPoint = self.mapVm.map.toScreen(snapPoint); var xDiff = Math.abs(currentScreenPoint.x - snapScreenPoint.x); var yDiff = Math.abs(currentScreenPoint.y - snapScreenPoint.y); if (xDiff > 4 || yDiff > 4) { snapPointGraphic = new graphic(value, polygonSnapSymbol); self.mapVm.map.graphics.add(snapPointGraphic); self.mapVm.map.graphics.redraw(); } } else { if (snapPointGraphic) { self.mapVm.map.graphics.remove(snapPointGraphic); snapPointGraphic = undefined; } } }, function() { if (snapPointGraphic) { self.mapVm.map.graphics.remove(snapPointGraphic); snapPointGraphic = undefined; } }); } else { if (snapPointGraphic) { self.mapVm.map.graphics.remove(snapPointGraphic); snapPointGraphic = undefined; } } Any hints would be appreciated.
... View more
04-18-2014
02:10 PM
|
1
|
1
|
782
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-18-2014 02:10 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|