|
POST
|
Dear All, From last two days i am stuck in this error.i have googled it.but could not succeed.i am trying to connect arcsde geodatabase using arcobjects. license status function return true and when i try to open the workspace factory i face the error "The Product License has not been initialised".please help. if (LicenseStatus()) { Console.WriteLine("Ready with license."); IPropertySet propertySet = new PropertySetClass(); propertySet.SetProperty("SERVER", "DESKTOP-FQEJI3R"); //propertySet.SetProperty("SERVERINSTANCE", "localhost"); propertySet.SetProperty("SERVERINSTANCE", "sde:sqlserver:DESKTOP-FQEJI3R"); propertySet.SetProperty("DATABASE", "Test"); // Only if it is needed propertySet.SetProperty("AUTHENTICATION_MODE", "DBMS"); propertySet.SetProperty("USER", "*****"); propertySet.SetProperty("PASSWORD", "*****"); //propertySet.SetProperty("DBCLIENT", "SQLServer"); propertySet.SetProperty("VERSION", "sde.Default"); // Create an SDE workspace factory and open the workspace. Type factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.SdeWorkspaceFactory"); IWorkspaceFactory workspaceFactory = (IWorkspaceFactory)Activator.CreateInstance(factoryType); IWorkspace workspace = workspaceFactory.Open(propertySet, 0); error Line //CreateMathFunctionRasterDataset(); aoInit.Shutdown(); } } catch (Exception exc) { aoInitialize.Shutdown(); // If it fails at this point, shutdown the test and ignore any subsequent errors. Console.WriteLine(exc.Message); } public bool LicenseStatus() { //This sample is designed to perform license initialization on a system //that may have access to a floating license. An ArcEditor license will be used. aoInitialize = new AoInitializeClass(); //Check the productCode. esriLicenseStatus licenseStatus = aoInitialize.IsProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeEngineGeoDB); if (licenseStatus == esriLicenseStatus.esriLicenseAvailable) { //Initialize the license. licenseStatus = aoInitialize.Initialize(esriLicenseProductCode.esriLicenseProductCodeEngineGeoDB); } //Take a look at the licenseStatus to see if it failed. if (licenseStatus == esriLicenseStatus.esriLicenseNotLicensed) { //Not licensed. MessageBox.Show("You are not licensed to run this product"); return false; } else if (licenseStatus == esriLicenseStatus.esriLicenseUnavailable) { //The licenses needed are currently in use. MessageBox.Show("There are insufficient licenses to run"); return false; } else if (licenseStatus == esriLicenseStatus.esriLicenseFailure) { //The licenses unexpectedly failed. MessageBox.Show( "Unexpected license failure please contact your administrator"); return false; } else if (licenseStatus == esriLicenseStatus.esriLicenseAlreadyInitialized) { //Already initialized (initialization can only occur once). MessageBox.Show( "Your license has already been initialized; please check your implementation."); return false; } else if (licenseStatus == esriLicenseStatus.esriLicenseCheckedOut) { //Everything was checked out successfully. MessageBox.Show("Licenses checked out successfully"); return true; } return false; }
... View more
08-20-2019
09:04 AM
|
0
|
2
|
6372
|
|
POST
|
Dear All, I am facing this problem.when i want to convert into utm coordinates i am getting the fallowing error. Uncaught TypeError: Cannot read property 'PeFactory' of null i did not understand what is null in my code i check every thing.please help. Thanks in advance. require([ "esri/map", "esri/layers/FeatureLayer", "esri/dijit/Search", "esri/geometry/coordinateFormatter", "esri/SpatialReference", "esri/geometry/Point", "esri/InfoTemplate", "dojo/domReady!" ], function (Map, FeatureLayer, Search,coordinateFormatter,SpatialReference,Point, InfoTemplate) { var lt="44.0505"; var lg="17.5183"; var pt = new Point(lt, lg, new esri.SpatialReference({ wkid: 4326 })); alert(pt.x+"_HELLO____"+pt.y); var str = coordinateFormatter.toUtm(pt, "north-south-indicators", true); alert(str); });
... View more
08-19-2019
11:03 PM
|
0
|
1
|
1881
|
|
POST
|
I am using 3.29 arcgis api and I don't have any portal I am making my custom app by the help of arcgis java script api 3.29
... View more
08-01-2019
01:58 AM
|
0
|
2
|
721
|
|
POST
|
Feat All, My featureservice is passwor dprotected.how can i apply the applyedits function of feature layer on this layer. Please help Thanks.
... View more
07-31-2019
10:42 PM
|
0
|
4
|
804
|
|
POST
|
Dear All i have some data in arabic.I want to display arabic calender in feature table.it is possible please help.like i select the column in given below image.here english calender come.i want here should come arabic calender. Thanks in advance
... View more
07-19-2019
01:26 PM
|
0
|
0
|
496
|
|
POST
|
Dear All , My customer wants some thing like given below image as print pdf file.how to make like this by the help of print task.i am using 3.28 Arcgis API version.please help. Thanks in advance.
... View more
06-29-2019
10:07 PM
|
0
|
1
|
569
|
|
POST
|
Dear All I successfully to show the vertices.But when i move there is no segment line visible.for this attached image is there.how to show segment line when i move the vertex .pls help Thanks
... View more
06-24-2019
06:04 AM
|
0
|
0
|
1043
|
|
POST
|
Dear all, my user draw the polygon from draw tool and after completing to draw a graphic polygon.He wants to double click that graphic.On double click of mouse event the graphic poylgon should show vertices and if user want to select any vertices and move that vertices in any direction.In flex viewer i see this functionality was there.if anyone have any idea or example please help,i want his in argisc java sciprt api Thanks in advance
... View more
06-23-2019
11:42 PM
|
0
|
2
|
1220
|
|
POST
|
Dear All i have two files in asp,net project.one is pure js file in which i defined all the map related function in dojo style library.Other file is .aspx page.In html part i am calling one function which is defined in map js file.After calling it always throuh me the error function not defined. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Home.aspx.cs" Inherits="WebApplication1.Home" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head > <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1 minimum-scale=1" /> <title>Asset View</title> <link rel="stylesheet" href="https://js.arcgis.com/3.28/dijit/themes/claro/claro.css" /> <link rel="stylesheet" href="https://js.arcgis.com/3.28/esri/css/esri.css" /> <script src="https://js.arcgis.com/3.28/"></script> <script src="Scripts/MapScript.js" type="text/javascript"></script> //Map Script file <script src="https://Code.jquery.com/jquery-1.12.4.js"></script> <link href="Content/Style.css" rel="stylesheet" /> </head> <body> <div style="height:100%;background-color:white;width:100%;position:fixed" > <div style="position: fixed; margin-top: 0px; margin-right: 0px; z-index:999; height:100px; width:100px; background-color:aquamarine "/> <div id="MapDiv" class="MapDiv"> </div> <div id="AttributeDiv" class="AttributeDiv"> </div> <div id="TblDiv" class="TblDiv"> <button id="btn" >CLick ME</button> </div> <script> $(document).ready(function () { $( "#btn" ).click(function() { layerVisibility("LayerNAme",true); //THis function is defined .mapScript.js file. Error on this line function not defiined. }); }); </script> </body> </html> ///Map JS file var map; var basemap; var dynamicMapServiceLayer; var RestServiceUrl; var featureServiceValidURl; var featureServiceRenewalURl; var featureServiceExpiredURl; var featureServiceBlockedURl; var app = {}; require(["dojo/dom", "dojo/on", "dijit/registry", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/layers/ArcGISTiledMapServiceLayer", "esri/map", "esri/layers/FeatureLayer","esri/layers/ImageParameters", "dojo/parser", "esri/tasks/QueryTask", "esri/tasks/query", "esri/graphic", "dojo/domReady!" ], function (dom, on, registry, ArcGISDynamicMapServiceLayer, ArcGISTiledMapServiceLayer, Map, FeatureLayer, ImageParameters, parser, QueryTask, Query, GraphicMap) { parser.parse(); var streetsService = "https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"; map = new Map("MapDiv", { basemap: "osm" zoom: 6, center: [46.66, 24.72] // longitude, latitude }); map.on("load", mapLoaded); var imageParameters = new ImageParameters(); imageParameters.format = "jpeg" function mapLoaded() { var featureLayer = new FeatureLayer(featureServiceRenewalURl, { mode: FeatureLayer.MODE_ONDEMAND, outFields: ["*"] }); map.addLayer(featureLayer); } var dynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer("http://0.0.00:6080/arcgis/rest/services/UpdateLicenes/MapServer", { "opacity": 0.5, "imageParameters ": imageParameters } ); map.addLayer(dynamicMapServiceLayer); //**********************************************************************************************************************// function layerVisibility( strLAyerName,BLFlag) { alert("gggggggggg"); } //**********************************************************************************************************************// });
... View more
06-15-2019
04:49 AM
|
0
|
1
|
1350
|
|
POST
|
Dear Irtiza Hussain Thanks for your reply.But the problem is that you are adding feature layer on map and opening map on html page.I dont want this.I just want to do this in java script file. I hope you have understand.I dont want to open map window.My user just want to click the button on one of my page.In response featurelayer shoukd update without adding adding layer on the map and no need of opening map window.Just an alert come data updated. Thanks
... View more
06-12-2019
12:49 AM
|
0
|
1
|
821
|
|
POST
|
Dear All. I want to applyedits on feature layer without showing or loading map window.i want as user perform action no map should open or load window and featurelayer.appyedits should work silently witout loading map and adding feature layer on the map.please help. Thanks in advance.
... View more
06-11-2019
11:22 PM
|
0
|
3
|
956
|
|
POST
|
Dear Robert it works like the code below.Problem is is query tak.execute.For update delete and insert the feature layer should execute quer.like below code. var queryTask = new esri.tasks.QueryTask(RestServiceUrl + "/0");//Query For Valid Licences var query = new esri.tasks.Query(); query.returnGeometry = true; query.outFields = ["*"]; query.where = "LicsNumber= '" + strLicsNumber + "'"; queryTask.execute(query, QueryResults);///Problem line for updating feature layer. UpdateValidLayer.queryFeatures(query, QueryResults);...this line is correct
... View more
06-11-2019
11:05 PM
|
0
|
0
|
2125
|
|
POST
|
Same error.But i have insert new record without loading map.that work.But update and delete not work.
... View more
05-23-2019
02:43 PM
|
0
|
1
|
517
|
|
POST
|
Robert, its double.But i already changed in my code.the fallowing error coming Cannot read property 'attributes' of undefined. what is undefined in this small code.this make me crazy
... View more
05-23-2019
01:36 PM
|
0
|
3
|
974
|
|
POST
|
Dear Robert, the above code also not work.i think some problem in the code given below which i am using var queryTask = new esri.tasks.QueryTask(RestServiceUrl + "/0");//Query For Valid Licences var query = new esri.tasks.Query(); query.returnGeometry = true; query.outFields = ["*"]; query.where = "OBJECTID = '" + strLicsNumber + "'"; queryTask.execute(query, function (resultset) { if(resultset.features.length>0){ validFeature = resultset.features[0]; ---->i am getting the feature here this line is right or wrong updateValidFeature(validFeature ,strHello,strHello1); function updateValidFeature(validFeature,strHello,strHello1){ try { var UpdateValidLayer = new esri.layers.FeatureLayer(featureServiceValidURl); if(validFeature!=null){ alert("ff"); } validFeature["DISTANCE "]="100.00"; UpdateValidLayer.applyEdits(null,[validFeature],null, function (addResults, updateResults, deleteResults) { console.log("Apply Edits Successfully:", updateResults); alert("updated Successfully"); }, function (err) { alert(err.message+"_________"+err.code+"_________"+err.details+"_______"+err); console.log("Apply Edits Failed: ",err); }); } catch(Ex){ alert(Ex.message); } //////////////////// } pls check.
... View more
05-23-2019
01:20 PM
|
0
|
5
|
974
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-04-2020 12:17 PM |
| Online Status |
Offline
|
| Date Last Visited |
05-30-2023
10:23 PM
|