|
POST
|
I've tried setting esri.bundle.toolbars.draw.addPoint and esri.bundle.toolbars.draw.freehand but my drawing tools keep showing the default tooltip. When I type console.dir(esri.bundle) in my browser's console they actually have changed to the strings I set though. Any idea of what is going on?
... View more
01-22-2014
06:34 AM
|
0
|
4
|
1167
|
|
POST
|
The thread title says it all. I want to change the label of the Delete button in the Attribute inspector to 'Dismiss'. As that label has more sense in the context of my application. Is this possible?
... View more
01-20-2014
06:24 AM
|
0
|
5
|
4162
|
|
POST
|
It is the second time this week I find the answer to my question right after I open a new thread. There is a sample showing this same thing I want to do. Guess the sample's title doesn't give a direct clue about its content unless you've already concluded you should use two attribute inspectors. https://developers.arcgis.com/en/javascript/jssamples/ed_multipleAttrInspector.html Hope this thread helps someone else. 🙂
... View more
01-17-2014
01:49 AM
|
0
|
0
|
505
|
|
POST
|
I need to disable geometry and attribute update in my app. The disableGeometryUpdate property of the layerInfos object works as expected but the disableAttributeUpdate property doesn't. According to the documentation: disableGeometryUpdate: When true,the geometry is not editable. The default value is false. Requires ArcGIS Server feature service version 10.1 or greater. disableAttributeUpdate: If true, attributeInspector won't pop up when features in this featureLayer are selected. When adding a new feature, attributeInspector won't pop up either. What I want is to show the attributeInspector and allow attribute editing when creating features, and show the attributeInspector but disable attribute editing when features are selected. Is there any way to do this? There's an isEditable property of the layerInfos object which when set to false disables editing for all fields. So if I find a way of changing that property to false when I click a feature and set it to true when I create a new feature I would achieve my goal! Any idea of how to do this? I'm trying to do something with the templatePicker's onSelectionChange event but I'm stuck. When I click on the map to create a new feature the template is unselected again before the attributeInspector is shown so I can't use this to know when I'm creating a feature and when I'm selecting a feature. dojo.connect(templatePicker, "onSelectionChange", function () { var selected = templatePicker.getSelected(); if (selected) { alert(selected.template.name); //enable attribute editing }else{ alert("no template"); //disable attribute editing } });
... View more
01-16-2014
11:38 PM
|
0
|
1
|
2565
|
|
POST
|
It's ETRS89, the official datum in my country (and the 'officialy accepted' common spatial reference for Europe). All my data is in that spatial reference and its use is a requirement for my web app.
... View more
01-15-2014
05:06 AM
|
0
|
0
|
759
|
|
POST
|
I found the answer here: http://forums.arcgis.com/threads/78773-Error-using-ESRI-Print-Task-service Using Chrome I got this message: Uncaught typeerror: Converting circular structure to JSON. That helped me find what was going on. Firefox console and firebug were not sending any message.
... View more
01-14-2014
10:03 PM
|
0
|
0
|
1073
|
|
POST
|
I'm using the PrintTask to export my map to PDF and it's working when I have graphics in the default GraphicsLayer of the map. But if a create a new GraphicsLayer and add new graphics to it the PrintTask won't execute but won't throw an error. Is this a bug? Does anyone have an example of printing graphics in a GraphicsLayer using PrintTask? For more details I'm adding polygons to my GraphicsLayer using SimpleFillSymbols.
... View more
01-14-2014
02:24 AM
|
0
|
5
|
3478
|
|
POST
|
I'm not loading any basemap. Maybe the navigation.zoomToFullExtent() method uses the default spatial reference of the map class (i.e. 4326). I think it should zoom to the extent of the first layer added if you are not loading a basemap to your map. That would have some more sense. I'm also getting this error when zooming to selected features of layers with a spatial reference different than that of my map (25831). The newer versions of the API aren't working as I expected. Everything works if you use spatial reference 4326 but when working with other spatial references you get this error. As a workaround I'm using the map.setExtent(initialExtent); you suggested and replacing every map.spatialReference with the mySpatialRef object I defined.
... View more
01-13-2014
10:38 PM
|
0
|
0
|
759
|
|
POST
|
As I'm only loading a single layer I can't do this then: wmsLayer.spatialReference = map.spatialReference; Ok. That has sense. But if I do this, wmsLayer.spatialReference = mySpatialRef; I shouldn't have an issue when zooming to full extent. Press the 'Full extent' button in my app and see the message in the web browser console. The spatial reference of my wms layer is 25831 and my map is taking it correctly. But then for some reason when zooming to full extent it considers the spatial reference of my wms layer is 4326. Is it a bug?
... View more
01-13-2014
02:26 AM
|
0
|
0
|
759
|
|
POST
|
I'm having some issues with 3.7 version of the API. Now it is with zooming to full extent. It doesn't work and I get this log in the console: [HTML]"Map: Geometry (wkid: 4326) cannot be converted to spatial reference of the map (wkid: 25831)"[/HTML] I'm afraid this is the main reason I'm having some other issues but I better focuse on just one and see how to fix it. I added a function to check the map's spatial reference as I was having issues with that too. This is some sample code based on my actual code with the zooming to full extent not working. It worked with version 2.1 of the API. Didn't I define the spatial reference of the map properly? <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<link rel="stylesheet" href="http://js.arcgis.com/3.7/js/esri/css/esri.css"/>
<style>
html, body, #mapDiv{
padding: 0;
margin: 0;
height: 100%;
}
</style>
<script src="http://js.arcgis.com/3.7/"></script>
<script>
var mySpatialRef;
var initialExtent;
var map;
var urlWMSBase="http://mapcache.icc.cat/map/bases/service?";
var wmsLayer;
var navToolbar;
dojo.require("esri.map");
dojo.require("esri.layers.agsdynamic");
dojo.require("esri.layers.ImageParameters");
dojo.require("esri.geometry.Extent");
dojo.require("esri.layers.wms");
dojo.require("esri.toolbars.navigation");
dojo.ready(function() {
esriConfig.defaults.io.proxyUrl = "http://FLOPEZV:8080/proxy/proxy.jsp";
init();
});
function init(){
mySpatialRef = new esri.SpatialReference({"wkid":25831});
initialExtent = new esri.geometry.Extent(258000,4485000,536000,4766600,mySpatialRef);
map = new esri.Map("mapDiv", {
extent: initialExtent,
spatialReference: mySpatialRef //unnecessary?
});
navToolbar = new esri.toolbars.Navigation(map);
addWMSLayer();
map.on("load",showSR);
}
function showSR(){
alert(map.loaded);
alert(map.spatialReference.wkid);
}
function addWMSLayer(){
wmsLayer = new esri.layers.WMSLayer(urlWMSBase);
wmsLayer.setVisibleLayers(["orto"]);
wmsLayer.spatialReference = mySpatialRef; //map.spatialReference;<-- should this work?
wmsLayer.setImageFormat("png");
wmsLayer.version = "1.1.3";
map.addLayer(wmsLayer);
}
</script>
</head>
<body>
<div id="mapDiv"></div>
<div id="rightPane" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'right'">
<button id="btn_fullExtent" data-dojo-type="dijit.form.Button" style="margin-right:10px;" type="button" onClick="navToolbar.zoomToFullExtent();">Full extent</button>
</div>
</body>
</html>
... View more
01-12-2014
11:13 PM
|
0
|
6
|
948
|
|
POST
|
I'm already using the map's onLoad event. But it's not working as it should. I think it has to do with using a proxy page. Weird. I'll look further into it tomorrow at work.
... View more
01-12-2014
09:52 AM
|
0
|
0
|
767
|
|
POST
|
The origin of the error is here: query.outSpatialReference = map.spatialReference; According to the documentation for the outSpatialReference property for esri.tasks.query: If not specified, the geometry is returned in the spatial reference of the map. So I comented the line and it works. It also works if I change that line into this: query.outSpatialReference = {"wkid":25831}; So with that other line the outSpatialReference property was not retrieving the wkid from my map's spatial reference and it remained undefined. Any idea?? Is it a bug?
... View more
01-09-2014
10:26 PM
|
0
|
0
|
767
|
|
POST
|
This is the function I use for the queries in my app: function queryArcGIS(serviceId, layerId, where, outFields, blnGeomIn, geom, relGeom, blnGeomOut, callback, evt, bUserQuery){
//Workaround Bug NIM-086349 migració 10.1
var random = (new Date()).getTime();
where += " AND " + random + "=" + random;
AG_QueryTask = null;
AG_QueryTask = new esri.tasks.QueryTask("http://mydomain/SIG/rest/services/"+serviceId+"/MapServer/"+layerId);
//Query filter
var query = new esri.tasks.Query();
if (blnGeomIn) {
query.geometry = geom;
query.spatialRelationship=relGeom;
}
query.outSpatialReference = map.spatialReference;
query.returnGeometry = blnGeomOut;
query.outFields = outFields;
query.where=where;
AG_QueryTask.execute(query, function(featureSet) {
callback(featureSet,evt);
}, function(error){
hideLoading();
if (bUserQuery && error.message == "timeout exceeded") {missatge("Error",_("Took too long to answer. Try again"));}
else {errorMessage(error);}
}); It used to work with version 2.1 of the API, but with v. 3.7 I get a "e is undefined" error and I can't find why. I've been checking the esri.tasks.QueryTask and esri.tasks.Query documentation but I don't see what may be causing this error. Firebug console gives me this info: .cache["esri/tasks/query"]/</b<.toJson() /3.7/ (line 484) .cache["esri/tasks/QueryTask"]/</g<.execute() /3.7/ (line 272) .cache["esri/geometry/normalizeUtils"]/</B._createWrappers/</b[a.n]() /3.7/ (line 607) queryArcGIS() myarcgis.js (line 1301) init() myarcgis.js (line 134) .cache["dojo/ready"]/</b.addOnLoad/e<() /3.7/ (line 238) .cache["dojo/ready"]/</h() /3.7/ (line 237) .cache["dojo/ready"]/</b.addOnLoad() /3.7/ (line 238) initialize() myarcgis.js (line 51) onload() index.html (line 1)
... View more
01-09-2014
06:57 AM
|
0
|
5
|
1229
|
|
POST
|
Checking the differences in the documentation. Both work. on(navToolbar, "ExtentHistoryChange", extentHistoryChangeHandler); navToolbar.on("extent-history-change", extentHistoryChangeHandler); The same goes for on(map,...)/map.on(...): on(map, "LayersAddResult", function(e)); map.on("layers-add-result", function(e));
... View more
12-09-2013
11:32 PM
|
0
|
0
|
525
|
|
POST
|
The problem is that I have some personal geodatabases with feature classes which do not have the OBJECTID field indexed. Using Python I can find those fcs in my geodatabases. The next step in my script would be indexing the OBJECTID field but it won't let me. I get a '000308 : Invalid field type' error. Isn't there any other way to add the OBJECTID index programmatically? Upgrading the geodatabase to the latest version will not fix this.
... View more
11-21-2013
10:08 PM
|
0
|
0
|
1182
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 02-12-2020 01:42 AM | |
| 4 | 10-30-2019 06:40 AM | |
| 1 | 01-28-2014 09:53 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|