POST
|
Hi, I am trying to use Nunit testing in Arc Objects with Visual Studio 2010 and ArcGIS 10.2 with C#. The main problem seems the initializing of the Arc Objects. I used the below code for licence initialization [SetUp] public void Init() { ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop); var aoInit = new AoInitializeClass(); esriLicenseStatus status = aoInit.Initialize(esriLicenseProductCode.esriLicenseProductCodeStandard); } The license is correctly checked out. After add some code in TestCase and run the application, it throws exception: Failure: SetUp : System.DllNotFoundException : Unable to load DLL 'ArcGISVersion.dll': The specified module could not be found. ( Exception from HRESULT: 0x8007007E). But I given Esri.ArcGIS.Version dll reference. Does any one worked on Nunit Testing in Arcobjects? Please give the suggetions for this. Thanks & Regards, Upendra
... View more
04-07-2014
11:31 PM
|
0
|
0
|
531
|
POST
|
Thanks to Ken Buja and Jason Zou for reply. As per the requirement we used the services like the above. I wrote one function for delete the basemap layer in legend. It's working fine on load the application. function legendDisplay() { var domNode = legend.domNode; for (k=0;k< legend.domNode.childNodes.length;k++) { var nodeid = legend.domNode.childNodes .id var str =nodeid.substring(0,15); if ( str =="legendDiv_layer"){ //if ( nodeid="legendDiv_layer0"){ legend.domNode.removeChild(legend.domNode.childNodes ); k=k-1; } } } I used this function map onLoad function. But the problem is after change the basemap layer , the basemap layer displays in legend. Is there any event for basemap layer change event. I tried in dojo.forEach(basemapGallery.basemaps, function (basemap) { //Add a menu item for each basemap, when the menu items are selected dijit.byId("bingMenu").addChild(new dijit.MenuItem({ label : basemap.title, onClick : dojo.hitch(this, function () { this.basemapGallery.select(basemap.id); legendDisplay(); }) })); }); and basemapGallery.on("selection-change", function(evt) { legendDisplay(); }); and dojo.connect(map, "onBaseChange", mapReady1); function mapReady1(map){ bool=true; legendDisplay(); } The above three functions are inside init() only. Can you please suggest the solution for this... Thanks Upendra
... View more
08-26-2013
05:02 AM
|
0
|
0
|
559
|
POST
|
Thanks to Ken Buja and Jason Zou for quick reply. I will give more explanation about my layers and legend. Html code for checkbox: <li> <input type='checkbox' class='cbLayers beaches' id='0,1,2,3,4,5' value=603 onclick='updateLayerVisibility(this);'/> </li> <li> <input type='checkbox' class='cbLayers beaches' id='6,7,8,9,10,11' value=1 onclick='updateLayerVisibility(this);'/> </li> <li> <input type='checkbox' class='cbLayers beaches' id='12,13,14,15,16,17' value=3 onclick='updateLayerVisibility(this);'/> </li> JavaScript code: Add LayerCode: "Add layers to the Map" function mapAddLayer(layer) { if(layer.declaredClass == "esri.layers.FeatureLayer") { var pt = layer._url.path.split("/").slice(-1)[0]; map.FeatureLayer[pt] = layer; } else { map.addLayer(layer); } } For Layer on/off code: var inputs = dojo.query(".cbLayers"); for (var i = 0; i < inputs.length; i++) { if (inputs.checked) { console.log(inputs); updateLayerVisibility(inputs); } } function updateLayerVisibility(el) { var ptids = el.id.split(","); if(el.checked) { for(var i = 0; i < ptids.length; i++) { ptlayer = map.FeatureLayer[ptids]; map.addLayer(ptlayer); } } else { for(var i = 0; i < ptids.length; i++) { var ptlayer = map.FeatureLayer[ptids]; map.removeLayer(map.getLayer(ptlayer.id)); } } } Legend code: var legend = new esri.dijit.Legend({ map : map, }, "legendDiv"); legend.startup(); BaseMap code: var basemaps = []; var streetBasemap = new esri.dijit.Basemap({ layers : [Street_Map_TemplateLayer], title : "Streets", thumbnailUrl : "images/Streets.png" }); basemaps.push(streetBasemap); // ("Like the way i added all the basemap layers"); dojo.forEach(basemapGallery.basemaps, function (basemap) { dijit.byId("baseMenu").addChild(new dijit.MenuItem({ label : basemap.title, onClick : dojo.hitch(this, function () { this.basemapGallery.select(basemap.id); }) })); }); Here i have multiple feature layers and grouped by category wise(check box ids are same as layer ids). Thanks
... View more
08-12-2013
11:04 PM
|
0
|
0
|
559
|
POST
|
Hello, I have an issue about Legend. In my application i'm using basemap gallery.After map load base map is appears in legend. How to hide the basemap layer in legend. I tried the hidelayers concept (legend is not working), but no luck. Below i add the sample code and image.Anybody have solution for this? var legend = new esri.dijit.Legend({ map : map, layerInfos: [{hideLayers: baseMapLayer}] }, "legendDiv"); legend.startup(); I used updateLayerVisibility() method for layers on/off. Thanks [ATTACH=CONFIG]26643[/ATTACH]
... View more
08-12-2013
06:00 AM
|
0
|
6
|
2722
|
POST
|
Hi, How to perform identity results depend on layer toggle on/off?. We are using display layers and identity layers are different but layer class is same, identity layers are not visible and we used updateLayerVisibility for layer on/off. Any suggestions would be appreciated.. Thanks Upendra
... View more
07-23-2013
09:57 PM
|
0
|
4
|
533
|
POST
|
Hello, I would like to make a python Add In that would be a toolbar containing all the basic tools like Zoomin,Zoomout,Pan and Full extent. I have idea about how to create toolbar and tools using Python Add In wizard. Can you please tell me the syntax for these basic tools using Python(ArcPy). Thanks in Advance
... View more
06-25-2013
09:40 PM
|
0
|
1
|
699
|
POST
|
Hello, I would like to make a python Add In that would be a tool bar containing all the basic tools like Zoom in,Zoom out,Pan and Full extent. I have idea about how to create tool bar and tools using Python Add In wizard. Can you please tell me the syntax for these basic tools using Python(ArcPy). Thanks in Advance.
... View more
06-25-2013
09:32 PM
|
0
|
0
|
487
|
POST
|
Hello, i want to develop one tool for select graphics in Arc Engine globe control application(standalone). In the globe control default selection tool is not visible. How to develop select graphics tool or enable the default select tool in globe control application. Any suggestion would be appreciated. Thanks & Regards Upendra
... View more
04-14-2013
10:09 PM
|
0
|
1
|
708
|
POST
|
Hello, How to dynamically change the measured grid interval based on the map scale using print task in JavaScript API. (Or) Is there any method or function to change the measured grid interval in JavaScript API. Thanks in advance
... View more
02-12-2013
01:21 AM
|
0
|
0
|
326
|
Online Status |
Offline
|
Date Last Visited |
04-12-2021
12:09 AM
|