POST
|
The example you sent refers to the buttons that located on the sides of the map that performs a smooth map movement. I am looking for a smooth movement by dragging the map with the mouse. Thanks, Jeff Yea your right, I didn't saw that. One thing you can look at is the onPan, onPanStart and onPanEnd events of the map object (http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/map.htm#onPan)... but I don't see an easy way to do that. Good luck.
... View more
01-11-2012
01:15 AM
|
0
|
0
|
521
|
POST
|
Hello, I posted this problem in the JavaScript forum, and there advised me to posted here. This was the thread http://forums.arcgis.com/threads/45064-Alphanumeric-Editing-of-non-SDE-data.. I'm trying to edit alphanumeric data residing in another database, not SDE. I created a view from the table I want to edit in the SDE database, registered it, and using ArcMap I can now edit the data with no problem, but when I try to edit using the JavaScript API, with the AttributeInspector Widget, the server gives a error, but applies the edits anyway, and locks the table. I have to manually stop the service to access the data. The server logs say: <Msg time='2012-01-10T12:13:57' type='ERROR' code='100005' target='ARH_PROCESSOS_ALFA.MapServer' methodName='GraphicFeatureServer.ApplyEdits' machine='WKLAB10' user='?' process='8144' thread='8180' elapsed='0.03620'>Method failed.HRESULT = 0x80070057 : The parameter is incorrect. .</Msg>. Is there anyway to get around this? Please help me out, and if you need anymore information please let me know! Thanks!
... View more
01-10-2012
07:04 AM
|
0
|
1
|
813
|
POST
|
You can see an example on Google Maps or Bing Maps sites. When you drag the map, the map moves smoothly. When you release the left mouse button the map does not stop straight, but stops by the power of dragging the map you made. I think it could be really nice if it will be at the Javascript API. Thanks, Jeff You can accomplish that changing the esri.config.defaults.map.panDuration and esri.config.defaults.map.panRate configuration properties. See the sample here: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/mapconfig_smoothpan.html Hope it helps
... View more
01-10-2012
02:06 AM
|
0
|
0
|
521
|
POST
|
Hello, I think I kinda managed to edit data of a table of a non-SDE database. I have several SQL Server databases, and only one SDE database also on SQL Server. I created views in the SDE database that go get data to the other databases, then I registered the views in the geodatabase, and now I can edit this tables using ArcMap through the views, and all works brilliantly. The problem is when I try to edit in the WebApplication... I published a service that as the tables. I managed to pass the data to the AttributeInspector, and seems well until... I edit the data. I changed the onAttributeChange event to handle the edits. When I go to edit the information, the event triggers, and the error function is called but the edits go through anyway, although for some odd reason the table gets locked and I have to manually stop the service, only then the lock in the table is release. Here's the code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="https://community.esri.com/arcgis_js_api/library/2.6/jsapi/js/dojo/dijit/themes/tundra/tundra.css">
<script src="/arcgis_js_api/library/2.6/jsapi/" type="text/javascript"></script>
<script type="text/javascript">
djConfig = {
parseOnLoad: true
};
</script>
<style type="text/css">
#attrInspector {width: 250px;}
.esriAttributeInspector {padding: 10px; width: 100px;}
.esriAttributeInspector .atiLayerName {display:none;}
</style>
<script type="text/javascript">
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("esri.map");
dojo.require("esri.layers.FeatureLayer");
dojo.require("esri.dijit.AttributeInspector-all");
var map, featureLayerAlfaMMServer, featureLayerAlfaLinkedServer, featureLayerGeo;
function init() {
//map options and actions
var initialExtent = new esri.geometry.Extent({"xmin":-1051697,"ymin":4386071,"xmax":-776524,"ymax":4569520,"spatialReference":{"wkid":102100}});
map = new esri.Map("map",{extent:initialExtent});
dojo.connect(dijit.byId('map'), 'resize', map,map.resize);
dojo.connect(map, "onLayersAddResult", init2);
//simple layer for visualization
var sessaoProcesso = new esri.layers.ArcGISDynamicMapServiceLayer("http://localhost/ArcGIS_Server/rest/services/ARH_PROCESSOS_ALFA/MapServer",{id:"sessaoProcesso"});
map.addLayer(sessaoProcesso);
//featurelayer with alphanumeric data from a view within the same server
featureLayerAlfaMMServer = new esri.layers.FeatureLayer("http://localhost/ArcGIS_Server/rest/services/ARH_PROCESSOS_ALFA/FeatureServer/1",{
mode: esri.layers.FeatureLayer.MODE_SELECTION
,outFields: ["*"]
});
//featurelayer with the spatial data
featureLayerGeo = new esri.layers.FeatureLayer("http://localhost/ArcGIS_Server/rest/services/ARH_PROCESSOS/FeatureServer/0",{
mode: esri.layers.FeatureLayer.MODE_SELECTION
,outFields: ["*"]
});
var selectionSymbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE, 10, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 1), new dojo.Color([0,255,0,0.25]));
featureLayerGeo.setSelectionSymbol(selectionSymbol);
//after the layers are added, go to init2
map.addLayers([featureLayerGeo]);
}
function init2(){
//get all the features for the alphanumeric layer
var selectQuery = new esri.tasks.Query();
selectQuery.where = "1=1";
featureLayerAlfaMMServer.selectFeatures(selectQuery, esri.layers.FeatureLayer.SELECTION_NEW, function(features,selectionMethod){
spatialSearch(features[0].attributes.Lic_licenca);
});
var layerInfosMMServer = [{'featureLayer':featureLayerAlfaMMServer,
'showAttachments':false,
'isEditable': true,
'showDeleteButton':false
}];
var attInspectorMMServer = new esri.dijit.AttributeInspector({layerInfos:layerInfosMMServer}, "attrInspectorMMServer");
dojo.connect(attInspectorMMServer,"onNext", function(feature) {
spatialSearch(feature.attributes.Lic_licenca);
});
//save changes
dojo.connect(attInspectorMMServer, "onAttributeChange", function(feature,fieldName,newFieldValue) {
console.log("Edit",feature,fieldName,newFieldValue);
feature.attributes[fieldName] = newFieldValue;
feature.getLayer().applyEdits(null, [feature], null, function(add,update,del){
console.log("Success",add,update,del);
}, function(error){
console.log("Error",error);
});
});
}
//function to "highlight" the feature related to the current record
function spatialSearch(licenca){
featureLayerGeo.clearSelection();
var query = new esri.tasks.Query();
query.where = "Lic_licenca = " + licenca;
featureLayerGeo.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW, function(){
if(featureLayerGeo.getSelectedFeatures().length > 0){
//Edit spatial
}else{
//Create spatial
}
});
}
dojo.addOnLoad(init);
</script>
</head>
<body class="tundra">
<div id="map" style="float: left; width: 70%; height:700px; border-top:1px solid black; border-bottom:1px solid black; border-right:1px solid black;"></div>
<div id="teste" style="float: right; width: 30%; height:700px; border-top:1px solid black; border-bottom:1px solid black; margin: 0px;">
<div style="width: 100%;" id="attrInspectorMMServer"></div>
</div>
</body>
</html>
Any input would be much appreciated.
... View more
01-09-2012
07:10 AM
|
0
|
0
|
154
|
POST
|
The problem usually has something to do with the length of the polyon JSON string. One solution you could try is to generalize the polygons prior to union to reduce the length of the JSON string. something this this:
var generalizeParams = new esri.tasks.GeneralizeParameters();
generalizeParams.geometries =esri.getGeometries(map.graphics.graphics);
geometryServiceLocal.generalize(generalizeParams, function(geometries){
geometryServiceLocal.union(esri.getGeometries(map.graphics.graphics), function(geometry){
......
});
});
Hi, and happy new year everyone! Thanks for your reply Heming, but now I have an error using the Generalize task: "Nullable object must have a value." when using 4 geometries. "'geometries' parameter is invalid." when using 5 geometries. The second one I think it's related with the previous problem, but the first one I have no idea. I think its something simple, but I don't get what...
... View more
01-02-2012
05:09 AM
|
0
|
0
|
555
|
POST
|
I've set up a simple example to show you what's happening. Here, http://193.136.119.25/tests/test_union.html, you'll find a map with only one layer. When you click on the buttons, a query will be performed, the results will be added to the map and then I try to perform the union based in the graphics of the map. The only difference is that one works and the other doesn't. Use the console to see what's happening. You can also switch between ESRI and local geometry services... the results will be the same. Is it a problem with the geometries? Is it something I can configure in the server? Is it just a limitation of the geometry service?
... View more
12-26-2011
08:38 AM
|
0
|
0
|
555
|
POST
|
Hi, and Happy Holidays everyone. Can anyone, from ESRI or otherwise, help me with this? I already tried using the esri geometry service, http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer, and had exactly the same result: [HTML]"Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property. Parameter name: input"[/HTML] I'll try to put something online for you to test it.
... View more
12-26-2011
05:06 AM
|
0
|
0
|
555
|
POST
|
Just did a further research and found you may experiencing the known bug with the javascriptserializer::MaxJsonLength property. [#NIM066822 MaxJsonLength exceeded error message is returned when an input geometry to an SOE contains a large number of vertices ] I checked the bug status, it is fixed in version 10 SP3. Have you installed SP3? Yes I have. I've just ran the PatchFinder and I already have the SP3 of all products. I tried to alter the web.config in order to set maxJsonLength like this:
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="50000000">
</jsonSerialization>
</webServices>
</scripting>
</system.web.extensions>
Still the same result...
... View more
12-21-2011
04:52 AM
|
0
|
0
|
555
|
POST
|
Have you tried a proxy page? http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/ags_proxy.htm Hi, thanks for your response. I configured the proxy, but I still get the same error. I tested with and without the proxy, and as I increase the complexity of the geometries to unify, the error "Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property." appears exactly at the same point... any other ideas? I implement a fallback plan, that when the union fails, I just get the extents of the geometries, and use that to perform the query, but I still would like to get the union to work...
... View more
12-21-2011
01:06 AM
|
0
|
0
|
555
|
POST
|
Hi, My application has a function that performs a query based in the current map.graphcis. If there are more than 1 graphic I perform a union, and here the problem starts. This works well most of the times, but depending in the number/type of geometries to be "unified", sometimes the union throws two types of errors: One that I handle using the errback function One that returns a 500 Internal Serve error code The first one the error returned is "Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property. Parameter name: input". This error occurs when I send more than 100 geometries. Does anyone have any idea how to get around this? The second one doesn't give out a specific error... I noticed that it happens when I send big geometries. I'll try to see the server logs and try to find some clues. Can anyone give me a help/hint? Thanks I solved the 500 internal server error. I increased the allowed content length on IIS. But the first one persists and I don't know if it's a problem of configuration on the server or a problem with the geometries. The error occurs when: A lot of geometries are sent (more then 100) A few, but complex geometries are sent. If this question is better suitable for another forum, please tell me witch one to post it. If anyone has any idea in how to solve this, please do tell! Thanks
... View more
12-20-2011
05:34 AM
|
0
|
0
|
555
|
POST
|
Hi, My application has a function that performs a query based in the current map.graphcis. If there are more than 1 graphic I perform a union, and here the problem starts. This works well most of the times, but depending in the number/type of geometries to be "unified", sometimes the union throws two types of errors: One that I handle using the errback function One that returns a 500 Internal Serve error code The first one the error returned is "Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property. Parameter name: input". This error occurs when I send more than 100 geometries. Does anyone have any idea how to get around this? The second one doesn't give out a specific error... I noticed that it happens when I send big geometries. I'll try to see the server logs and try to find some clues. Can anyone give me a help/hint? Thanks
... View more
12-20-2011
01:26 AM
|
0
|
10
|
2094
|
POST
|
Can someone please help me! I'm trying to use AttributeInspector to show the contents of a Feature layer. My reference is this sample http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/ed_attribute_inspector.html, but I want to be able to browse the data without necessarily see it on the map. I think I managed but for some reason the AttributeInspector doesn't show the fields, just delete button, and the navigation buttons (so I supose that its getting the data). Can someone please help me? Here's my code. The AttributeInspector starts when you call the function queryProcess() from the console. Its this way for testing proposes.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Tests</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.5/js/dojo/dijit/themes/claro/claro.css">
<script src="/arcgis_js_api/library/2.5/arcgis/" type="text/javascript"></script>
<script type="text/javascript">
djConfig = {
parseOnLoad: true
};
</script>
<style type="text/css">
.esriAttributeInspector {height:100px;}
.esriAttributeInspector .atiLayerName {display:none;}
.saveButton {
padding-left:45px;
margin:0px;width:16px; height:16px;
}
</style>
<script type="text/javascript">
dojo.require("esri.map");
dojo.require("esri.layers.FeatureLayer");
dojo.require("esri.dijit.AttributeInspector-all");
var initialExtent = new esri.geometry.Extent({"xmin":-1051697,"ymin":4386071,"xmax":-776524,"ymax":4569520,"spatialReference":{"wkid":102100}});
var baseMap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer",{id:"basemap"});
var sessaoBase = new esri.layers.ArcGISDynamicMapServiceLayer("http://localhost/ArcGIS_Server/rest/services/ARH_BASE/MapServer",{id:"sessaobase"});
var featureLayer;
var map;
var processosId;
function init() {
//criar mapa
map = new esri.Map("map",{extent:initialExtent, logo:false});
//criar a featurelayer
featureLayer = new esri.layers.FeatureLayer("http://localhost/ArcGIS_Server/rest/services/ARH_PROCESSOS/FeatureServer/1",{
mode: esri.layers.FeatureLayer.MODE_SELECTION
,outFields: ["*"]
});
var attInspector = new esri.dijit.AttributeInspector({layerInfos:[{'featureLayer':featureLayer}]}, "attrInspector");
//adicionar layers ao mapa
map.addLayers([baseMap,sessaoBase]);
}
function queryProcess(){
var query = new esri.tasks.Query();
query.where = "ObjectID > 1";
featureLayer.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW, function(features){
console.log(features);
});
}
dojo.addOnLoad(init);
</script>
</head>
<body class="claro">
<div id="map" style="float: left; width: 50%; height:400px; border-top:1px solid black; border-bottom:1px solid black; border-right:1px solid black;"></div>
<div id="teste" style="float: right; width: 50%; height:400px; border-top:1px solid black; border-bottom:1px solid black;">
<div id="attrInspector"></div>
</div>
</body>
</html>
... View more
12-12-2011
09:15 AM
|
0
|
0
|
625
|
POST
|
Hi, I'm developing an WebGIS application that has to be able to edit some alphanumerical data that is related to the geographical data. The problem is that this data is in another database. Is it possible to edit it using the JavaScript API with ArcGIS Server Services? Thanks
... View more
12-02-2011
12:53 AM
|
0
|
2
|
666
|
POST
|
The result may or may not be the same. For example a point which may be within the extend of a polygon may actually outside that polygon. That's what I thought. As I see it for better performance use the extents, because you don't need the geometry service, and for accuracy use the join (right?). By the way, is there a way to perform geometry operations (buffer, intersects, joins, etc) on the client side, without using the geometry services?
... View more
11-29-2011
06:13 AM
|
0
|
0
|
281
|
POST
|
your approach used the extent of map.graphics.graphics as query.geometry while mine merged map.graphics.graphics into one geometry and used that geometry as query.geometry. Ok, I understood that part, but I was wondering what's the best approach, and if the final result will be the same.
... View more
11-29-2011
02:19 AM
|
0
|
0
|
281
|
Title | Kudos | Posted |
---|---|---|
1 | 12-23-2014 06:06 AM | |
5 | 09-25-2012 03:28 AM | |
14 | 06-18-2014 02:19 AM | |
1 | 11-02-2011 06:40 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|