|
POST
|
Jian, Check out this sample http://107.21.20.43/editing/testpage4.html I am just hiding pointsOfInterest layer in initEditor function and snapping doesn't work for evacuationPerimeter layer.
... View more
07-30-2012
07:34 AM
|
0
|
0
|
1294
|
|
POST
|
Did you mean snapping stops working completely, or not working with those invisible layers? Snapping only works with visible layers. It is by design. snapping stops completely for all the layers.
... View more
07-30-2012
07:10 AM
|
0
|
0
|
1294
|
|
POST
|
I have about 10-12 layers in my application which needs to be edited. I don't want to show all the layers turned initially. I tried to hide some layers after the templatePicker and editor widget have loaded (layerName.hide()). What I am seeing is that snapping stops working in this case. I modified sample server demo to show this. In this code only thing different that I have done is to put a line at the end of initEditor() to hide one layer . Below is the code initEditor function. function initEditor(results) { //build the layer and field information for the layer, display the description field //using a text area. var layers = dojo.map(results, function(result) { var fieldInfos= dojo.map(result.layer.fields,function(field){ if(field.name === 'description'){ return {'fieldName': field.name,'label':'Details',stringFieldOption:esri.dijit.AttributeInspector.STRING_FIELD_OPTION_TEXTAREA} } else{ return {'fieldName': field.name,'lable':field.alias} } }); return {featureLayer:result.layer,'fieldInfos':fieldInfos} }); var settings = { map: map, enableUndoRedo:true, layerInfos:layers, toolbarVisible: true, createOptions: { polygonDrawTools: [ esri.dijit.editing.Editor.CREATE_TOOL_FREEHAND_POLYGON, esri.dijit.editing.Editor.CREATE_TOOL_AUTOCOMPLETE] }, toolbarOptions: { reshapeVisible: true, cutVisible: true, mergeVisible: true } }; var params = {settings: settings}; editorWidget = new esri.dijit.editing.Editor(params,'editorDiv'); //Dojo.keys.copyKey maps to CTRL in Windows and CMD in Mac map.enableSnapping({snapKey:dojo.keys.copyKey}); //create a new checkbox to enable/disable snapping var checkBox = new dijit.form.CheckBox({ name: "chkSnapping", checked:true, id: "chkSnapping", label:"Snapping", showLabel:"false", title:"Snapping", onChange: function(evt) { console.log(this.checked); if(this.checked){ map.enableSnapping({snapKey:dojo.keys.copyKey}); }else{ //map.disableSnapping(); } } }); //add the snapping checkbox to the editor's toolbar var myToolbarElement = dojo.query(".esriDrawingToolbar",editorWidget.domNode)[0]; var myToolbar = dijit.byId(myToolbarElement.id); myToolbar.addChild(new dijit.ToolbarSeparator()); myToolbar.addChild(checkBox); editorWidget.startup(); //listen for the template pickers onSelectionChange and disable //the snapping checkbox when a template is selected var templatePickerElement = dojo.query(".esriTemplatePicker",editorWidget.domNode)[0]; var templatePicker = dijit.byId(templatePickerElement.id); dojo.connect(templatePicker,"onSelectionChange",function(){ if(templatePicker.getSelected()){ //disable the snapping checkbox dijit.byId('chkSnapping').set("disabled",true); }else{ dijit.byId('chkSnapping').set("disabled",false); } }); map.infoWindow.resize(325,200); pointsOfInterest.hide(); // This is the line I added to test } Help needed !!
... View more
07-26-2012
12:09 PM
|
0
|
10
|
2681
|
|
POST
|
I took editor with toolbar sample code and replaced the feature service with our secured services. Everything works fine except editor toolbar clear selection tool is not working. I tried replacing feature service again with open feature layer on our server, clear selection tool works again. Its just not working with secured layers.
... View more
07-10-2012
01:38 PM
|
0
|
0
|
599
|
|
POST
|
I have a secured map service and I tried to print the map with legend . Everything works except legend is not showing up in the print layer. Below is the code as how I am setting up the print button. Its same as given in one of the sample. var layouts = [ { "name": "Letter ANSI A Landscape", "label": "Landscape (PDF)", "format": "pdf", "options": { "legendLayers": [0,1,2,3], // empty array means no legend "scaleBarUnit": "Miles", "titleText":$("#title").val() } }, { "name": "Letter ANSI A Portrait", "label": "Portrait (Image)", "format": "pdf", "options": { "legendLayers": [0,1,2,3], "scaleBarUnit": "Miles", "titleText": $("#title").val() } } ]; // create the print templates, could also use dojo.map var templates = []; dojo.forEach(layouts, function(lo) { var t = new esri.tasks.PrintTemplate(); t.layout = lo.name; t.label = lo.label; t.format = lo.format; t.layoutOptions = lo.options templates.push(t); }); app.printer = new esri.dijit.Print({ map: app.map, "templates": templates, url: "http://107.21.20.43/webgis/rest/services/GPServices/SecurePrinting/GPServer/Export%20Web%20Map?token=" + response }, dojo.byId("print_Button")); app.printer.startup();
... View more
07-03-2012
01:59 PM
|
0
|
2
|
1988
|
|
POST
|
Hi Rick, Thanks for the reply. I tried to follow the concept in OnlineOffline sample , but no luck yet. I couldn't understand why there are multiple write and read function i.e, writeFeatureLayerDefinition, writeFeatureSet and writeAddedFeatures. I am very new to iOS development so can't everything in the sample. In my application I don't need to add or delete features, I just need update the features from textfile when get online. I am trying to implement the writeAddedFeatures and readAddedFeatures function from OnlineOffline sample. I am able to write the features exactly given in the sample, but in my readAddedfeatures function IO am getting an error "-[AGSGraphic graphic] inrecoganized selector sent to instance 0x84cf270" and "Terminating due to uncaught exception 'NSInvalidArgumentEception'"
... View more
06-15-2012
06:56 AM
|
0
|
0
|
598
|
|
POST
|
Have a look at the OnlineOffline Editing sample. It should give you an idea of what to do. It uses JSON for the layer definition and data files. Hi Rick, Thanks for the reply. I tried to follow the concept in OnlineOffline sample , but no luck yet. I couldn't understand why there are multiple write and read function i.e, writeFeatureLayerDefinition, writeFeatureSet and writeAddedFeatures. I am very new to iOS development so can't everything in the sample. In my application I don't need to add or delete features, I just need update the features from textfile when get online.
... View more
06-14-2012
11:53 AM
|
0
|
0
|
598
|
|
POST
|
I am trying to create offline editing application. What I am doing is that storing comma separated features in a text file in offline mode and then want to read this text file when in online mode and update the feature layer. I have no idea how to read features from text file and apply updateFeatures function to the feature layer. Any help?
... View more
06-14-2012
07:06 AM
|
0
|
4
|
898
|
|
POST
|
Were you able to get this to work?. I am very new to iOS development and having troubles. I just need to do simple offline/online attribute editing without any add or delete feature.
... View more
05-14-2012
11:20 AM
|
0
|
0
|
424
|
|
POST
|
Is there a way to attach image located on remote server to the feature using javascript, that is without using upload file option?
... View more
04-13-2012
10:13 AM
|
0
|
0
|
1889
|
|
POST
|
I have a map service running on Server 10.1 , which has new map print capability. When I am trying to change the visble layers for a dynamic map then it does not reflect the same change on the PDF output. Any suggestions ??
... View more
03-28-2012
08:17 AM
|
0
|
0
|
523
|
|
POST
|
I got an error when I debug the proxy.ashx error message screenshot is attached.
... View more
02-21-2012
09:35 AM
|
0
|
0
|
1830
|
|
POST
|
I tired that to, but that doesn't work either. after adding the given line on config file , I tried this http://wsbv7/proxy/proxy.ashx?https://wsbv7/WebGIS/tokens?request=getToken&username=Vikrant&password=vik this again gives 403 error. I am not sure if this is related to our IIS settings or something in our server. Even trying to access secured service on esri server (given on esri token based security demo sample), through proxy page using the given username and password (rick and rick@esri) doesn't work either.
... View more
02-21-2012
09:03 AM
|
0
|
0
|
2712
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-17-2016 06:36 AM | |
| 1 | 05-02-2016 02:14 PM |
| Online Status |
Offline
|
| Date Last Visited |
08-20-2025
10:28 AM
|