POST
|
Agree, the updating process in Map View during animation does not work like Scene View. In other words, the goto() works as expected and the issue is the animation process itself. During this process, the image tiles are not updated. So when you animate a large scale map view in a short distance (according to scale), you can get an animation. Otherwise, during animation you get a white screen. Take a look at the following code that creates animation in Map view: <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<title>Popup actions - 4.8</title>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<link rel="stylesheet" href="https://js.arcgis.com/4.8/esri/css/main.css">
<script src="https://js.arcgis.com/4.8/"></script>
<script>
require([
"esri/Map",
"esri/views/MapView",
"esri/geometry/Point",
"dojo/domReady!"
], function (
Map,
MapView,
Point,
) {
var map = new Map({
basemap: "streets"
});
const point = new Point({
x: -96.8236,
y: 33.1507
});
const point1 = new Point({
x: -95.6236,
y: 33.5507
});
var view = new MapView({
container: "viewDiv",
map: map,
zoom: 8,
center: point
});
view.when(function () {
view.goTo({
center: point1,
zoom: 8
},
{ duration: 4000, easing: "linear " }
);
});
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html> If you increase the Zoom to 14 or duration to 400 you do not get a good animation.
... View more
07-14-2018
06:49 PM
|
0
|
0
|
438
|
POST
|
This worked for me: if type(valName) is str or type(valName) is unicode:
whereClause = FieldName + opName + "'" + valName + "'"
else:
whereClause = FieldName + opName + str(valName)
arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", whereClause)
... View more
04-10-2018
02:37 PM
|
0
|
1
|
383
|
POST
|
I am working on a simple application. The user can choose either Numeric values or string values to select (i.e. valName). However if you write the where clause like this: arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", FieldName + opName + "'" + valName + "'") It doesn't work for numbers and if you write like this: arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION",FieldName + opName + valName) It doesn't work for strings. Any simple solution without if condition?
... View more
04-10-2018
12:35 PM
|
0
|
3
|
553
|
POST
|
I am trying to select some features by "SelectLayerByAttribute_management" like this: flayer = arcpy.MakeFeatureLayer_management(r"D:\LAKES.shp", "myLayer")
arcpy.SelectLayerByAttribute_management(flayer, "NEW_SELECTION", """"NAME" = 'Clarks Hill Lake'""")
cnt = arcpy.GetCount_management(flayer)
print cnt
arcpy.RefreshActiveView() Everything is fine and cnt = 1, but in the map, it is not highlighted. How can highlight selected feature when you are running the arcpy script out of ArcGIS environment.
... View more
04-09-2018
03:42 PM
|
0
|
1
|
433
|
POST
|
ArcGIS Desktop version :10.4.1 ArcGIS Server version: 10.4.1 Enterprise Geodatabase version: I converted a SQL database to Geodatabase using " "Enable Enterprise Geodatabase" tool in Arcmap and registered the GDB at Arcgis server SQL Server version: SQL Server 2012 I am creating a very simple service. the python code of script is: import arcpy
arcpy.CheckOutExtension("3D")
arcpy.RasterDomain_3d(r"Database Connections\GS.sde\GS.DBO.R1",
r"Database Connections\GS.sde\GS_DBO_test", "POLYGON") it works as a ArcGIS tool perfectly and generate the polygon output: Then I shared the tool as Geoprocessing service. when I run the service on my ArcCatalog as follows: I get the following error: I do not know why the arcGIS server makes the same output in the a"scratch.gdb" in the server and fails because of the "Dots" in the name. As you know, ArcGIS does not accept Dot as a layer name in file Geodatabase.
... View more
01-08-2018
08:51 AM
|
0
|
1
|
873
|
POST
|
Thank you, I do not have any control on the name because the dots come from SQL server. When I switched the "." with "_", the output result is as follow: If I publish the service, It will not run because of the new Dots!
... View more
01-07-2018
11:16 PM
|
0
|
3
|
873
|
POST
|
Could you solve the "." problem. I cannot publish my service because of the dots in the layers name. Please let me know if you have any solution. Description of issue in detail: ############################### ArcGIS Desktop version :10.4.1 ArcGIS Server version: 10.4.1 Enterprise Geodatabase version: I converted a SQL database to Geodatabase using " "Enable Enterprise Geodatabase" tool in Arcmap and registered the GDB at Arcgis server SQL Server version: SQL Server 2012 I am creating a very simple service. the python code of script is: import arcpy
arcpy.CheckOutExtension("3D")
arcpy.RasterDomain_3d(r"Database Connections\GS.sde\GS.DBO.R1",
r"Database Connections\GS.sde\GS_DBO_test", "POLYGON") it works as a ArcGIS tool perfectly and generate the polygon output: Then I shared the tool as Geoprocessing service. when I run the service on my ArcCatalog as follows: I get the following error: I do not know why the arcGIS server makes the same output in the a"scratch.gdb" in the server and fails because of the "Dots" in the name. As you know, ArcGIS does not accept Dot as a layer name in file Geodatabase.
... View more
01-07-2018
09:31 PM
|
0
|
8
|
1348
|
POST
|
When I click om my Map View, it takes time to appear my custom popup. How can I show "Wait cursor" like default popups during this time?
... View more
12-03-2017
06:45 PM
|
0
|
2
|
1131
|
POST
|
I have just shared a geo-processing service and update my geo-database in the SQL server. look at Run Geo-processing Service.
... View more
11-30-2017
08:07 AM
|
0
|
0
|
475
|
POST
|
Found the problem. The rest URL is : http://XXX-XXXXX:6080/arcgis/rest/services/Script2/GPServer Bu in the code you should use the complete url (that you can find " ArcGIS REST Services Directory" in the browser) as follows: http://XXX-XXXXX:6080/arcgis/rest/services/Script2/GPServer/Script%201
... View more
11-30-2017
08:02 AM
|
0
|
0
|
435
|
POST
|
Hello I tried with both execute and submit job correctly. The parameters are Double Thanks
... View more
11-29-2017
09:03 PM
|
0
|
1
|
435
|
POST
|
Dear Xander, Could you please take a look at the new question (i.e. Updating Geo-Database, posted in November 29) that relates to this question? Thank you so much
... View more
11-29-2017
11:44 AM
|
0
|
1
|
475
|
POST
|
HI, I am trying to run a very simple python tool as Geo-processing Service. As usual I created the tool as follows: import arcpy
inputLong = float(arcpy.GetParameterAsText(0))
inputLat = float(arcpy.GetParameterAsText(1))
xy = [(inputLat, inputLong)]
fc = r"Database Connections\Connection to XXX-XXXXX.sde\A.DBO.CropPoint"
cursor = arcpy.da.InsertCursor(fc, ["SHAPE@XY"])
for row in xy:
cursor.insertRow([row])
del cursor and shared as Geo-processing Service on my ArcGIS server. On JavaScript I wrote the code as follows: var gpUrl = "http://XXX-XXXXX:6080/arcgis/rest/services/Script2/GPServer";
var gp = new Geoprocessor(gpUrl);
var params1 = {
Longitude: -101.55,
Latitude: 35.6
};
gp.submitJob(params1);
It does not work (i.e. does not add point to my point map), however I can directly run it in the "ArcGIS REST Services Directory" on my browser. Also I tried "gp.execute(params1)" to run the tool.
... View more
11-27-2017
03:03 PM
|
0
|
3
|
582
|
POST
|
Hi, I have already shared a point map through ArcGIS server and added as a feature layer to my Map. How can I add a created point graphics as a real point to the feature layer. Note that the feature layer is in a SQL server Geo-database and registered as versioned.
... View more
11-26-2017
09:19 PM
|
0
|
3
|
602
|
POST
|
Found the solution! I had to Check Out Spatial Analysis after importing arcpy as follow: import arcpy
arcpy.CheckOutExtension('Spatial') Cheers
... View more
11-01-2017
09:54 AM
|
0
|
0
|
1021
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|