POST
|
No solutions yet. Nothing in the StackOverflow either.
... View more
07-16-2020
12:40 PM
|
0
|
0
|
185
|
POST
|
I am trying to fetch data from a map server that I do not manage and I am receiving the following error: Proxy server got bad address from remote server (verify the server is running). (status code 504).
... View more
07-16-2020
12:37 PM
|
0
|
0
|
111
|
POST
|
Hi Ben, Changing the units worked. I am able to switch the units after the measurements, so seems like the initial measurement in feet was the case. Thanks.
... View more
07-15-2019
10:01 AM
|
1
|
0
|
91
|
POST
|
createWidget_MeasurementIn2D ( ) { var _app = this // Add Distance Button var _html = '' _html + = '<div ' _html + = ' id="distanceButton" class="waves-effect esri-widget--button esri-widget esri-interactive tooltipped" ' _html + = ' data-position="left" data-tooltip="Measure distance →">' _html + = ' <span class="esri-icon-polyline";></span>' _html + = '</div>' var _domElement = domConstruct . toDom ( _html ) ; domConstruct . place ( _domElement , "viewDiv" ) //Materialize Tooltips if ( window . M ) { var _tooltips = document . querySelectorAll ( '.tooltipped' ) ; var _tooltips_instances = M . Tooltip . init ( _tooltips ) ; var _thisTooltip = M . Tooltip . getInstance ( _domElement ) } _app . data . mapView . ui . add ( "distanceButton" , "top-right" ) ; // Add Area Button var _html = '' _html + = '<div ' _html + = ' id="areaButton" class="waves-effect esri-widget--button esri-widget esri-interactive tooltipped" ' _html + = ' data-position="left" data-tooltip="Measure area →">' _html + = ' <span class="esri-icon-polygon";></span>' _html + = '</div>' var _domElement = domConstruct . toDom ( _html ) ; domConstruct . place ( _domElement , "viewDiv" ) //Materialize Tooltips if ( window . M ) { var _tooltips = document . querySelectorAll ( '.tooltipped' ) ; var _tooltips_instances = M . Tooltip . init ( _tooltips ) ; var _thisTooltip = M . Tooltip . getInstance ( _domElement ) } _app . data . mapView . ui . add ( "areaButton" , "top-right" ) ; //Set Active 2D-Measurement widgets. document . getElementById ( "distanceButton" ) . addEventListener ( "click" , function ( ) { setActiveWidget ( null ) ; if ( ! this . classList . contains ( 'active2D' ) ) { setActiveWidget ( 'distance' ) ; } else { setActiveButton ( null ) ; } } ) ; document . getElementById ( "areaButton" ) . addEventListener ( "click" , function ( ) { setActiveWidget ( null ) ; if ( ! this . classList . contains ( 'active2D' ) ) { setActiveWidget ( 'area' ) ; } else { setActiveButton ( null ) ; } } ) ; function setActiveWidget ( type ) { switch ( type ) { case "distance" : _app . activeWidget = new DistanceMeasurement2D ( { view : _app . data . mapView , unit : "feet" , } ) ; _app . data . mapView . ui . add ( _app . activeWidget , "top-right" ) ; setActiveButton ( document . getElementById ( 'distanceButton' ) ) ; // skip the initial 'new measurement' button _app . activeWidget . viewModel . newMeasurement ( ) ; document . getElementById ( 'distanceButton' ) . style . cssText = 'background-color:#5E2590; color:#e4e4e4; border:1px solid #0c0800;' ; break ; case "area" : _app . activeWidget = new AreaMeasurement2D ( { view : _app . data . mapView , unit : "square-us-feet" } ) ; _app . data . mapView . ui . add ( _app . activeWidget , "top-right" ) ; setActiveButton ( document . getElementById ( 'areaButton' ) ) ; // skip the initial 'new measurement' button _app . activeWidget . viewModel . newMeasurement ( ) ; document . getElementById ( 'areaButton' ) . style . cssText = 'background-color:#5E2590; color:#e4e4e4; border:1px solid #0c0800;' ; break ; case null : if ( _app . activeWidget ) { _app . data . mapView . ui . remove ( _app . activeWidget ) ; _app . activeWidget . destroy ( ) ; _app . activeWidget = null ; document . getElementById ( 'distanceButton' ) . style . cssText = '' ; document . getElementById ( 'areaButton' ) . style . cssText = '' ; } break ; } } function setActiveButton ( selectedButton ) { // focus the view to activate keyboard shortcuts for sketching _app . data . mapView . focus ( ) ; var elements = document . getElementsByClassName ( "active2D" ) ; for ( var i = 0 ; i < elements . length ; i ++ ) { elements [ i ] . classList . remove ( "active2D" ) ; } if ( selectedButton ) { selectedButton . classList . add ( "active2D" ) ; } } }
... View more
07-09-2019
03:34 PM
|
0
|
3
|
91
|
POST
|
Hello, I have an app that uses both distance and area measurement widgets. There is no problem with 4.10 and 4.11 APIs but with the new version, 4.12, I get errors when I click on the widgets. I am not sure if the problem is because of the materialize.css and If you guys have any ideas, I would be appreciated. The errors are below. Uncaught ( in promise ) TypeError : Cannot read property 'center' of null at Object . a . _updatePolylines ( DistanceMeasurement2DTool . js : 15 ) at Object . < anonymous > ( DistanceMeasurement2DTool . js : 6 ) at f ( dojo . js : 386 ) at a . p [ as callback ] ( dojo . js : 387 ) at n ( dojo . js : 394 ) at dojo . js : 399 AreaMeasurement2DTool . js : 10 Uncaught ( in promise ) TypeError : Cannot read property 'coord' of undefined at AreaMeasurement2DTool . js : 10 at Array . map ( < anonymous > ) at Function . c . updateViewModelAndCreateGraphics ( AreaMeasurement2DTool . js : 10 ) at Object . c . _updateGraphics ( AreaMeasurement2DTool . js : 17 ) at Object . < anonymous > ( AreaMeasurement2DTool . js : 6 ) at f ( dojo . js : 386 ) at a . p [ as callback ] ( dojo . js : 387 ) at n ( dojo . js : 394 ) at dojo . js : 399
... View more
07-09-2019
12:47 PM
|
0
|
5
|
499
|
POST
|
Hello Kelly, Thanks for the answers. I have a question related to the topic. I was able to set the position of the div element with container property. But I was wondering if there is a better way to do it. Following is the code and this is the working file JS Bin - Collaborative JavaScript Debugging. Thanks, Esad var basemapGallery = new BasemapGallery ( { view : view , content : document . createElement ( "div" ) , container : "expandDiv" , } ) ; // Create an Expand instance and set the content // property to the DOM node of the basemap gallery widget // Use an Esri icon font to represent the content inside // of the Expand widget var bgExpand = new Expand ( { view : view , content : basemapGallery . domNode , //container: "expandDiv", expandIconClass : "esri-icon-basemap" } ) ; // Add the expand instance to the ui view . ui . add ( bgExpand , "top-right" ) ;
... View more
02-14-2019
06:19 AM
|
0
|
0
|
111
|
POST
|
Hello Joshua, I developed a Flask-Python application that uses both arcpy and pymssql libraries in it. When I run the app on the console, everything works, however, when I do it on the Flask app on 127.0.0.1:5000, the pymssql methods work but the arcpy methods don't. I tried Django for the same thing but had the same problem. The table is created but the arcpy method is not able to find it, below is the traceback, Additionally, there is the question about the issue on StackOverflow, Python Flask/Django app with ArcGIS, Arcpy does not run on Flask or Django - Stack Overflow Any help would be appreciated. Thanks, Esad ERROR "F:\Projects\Dashboard\Publish.sde\Publish.dbo.A_WebFlask" does not exist Traceback (most recent call last): File "C:\Flask_Dash\DashboardWithFlask.py", line 163, in my_form myLayer.dashboardMain() File "C:\Flask_Dash\DashboardClass.py", line 623, in dashboardMain descTable = arcpy.Describe(self.dbTablePath) File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\__init__.py", line 1253, in Describe return gp.describe(value) File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\geoprocessing\_base.py", line 376, in describe self._gp.Describe(*gp_fixargs(args, True))) IOError: "F:\Projects\Dashboard\Publish.sde\Publish.dbo.A_WebFlask" does not exist
... View more
07-15-2018
07:52 PM
|
0
|
2
|
185
|
Online Status |
Offline
|
Date Last Visited |
Monday
|