Posts

Showing posts with the label ESRI JS API

Code Snippet: ESRI JS API 4.11 get Latittude Longitude on mouse hover

ESRI JS API 4.11 get Latittude Longitude on mouse hover //print point on mouse hover on map mapView . on ( "pointer-move" , function ( event ){ let mapPoint = mapView . toMap ({ x: event . x , y: event . y }); console . log ( mapPoint ); }); //print point on mouse click on map mapView . on ( "click" , function ( event ){ let mapPoint = event . mapPoint ; console . log ( mapPoint ) }); Both console statement will return the identical object as below which has latitude and longitude { __accessor__ : b } cache :  (...) extent :  (...) hasM :  (...) hasZ :  (...) latitude :  (...) longitude :  (...) m :  (...) spatialReference :  (...) type :  (...) x :  (...) y :  (...) z :  (...) constructed :  (...) destroyed :  (...) initialized :  (...) __accessor__ :  b  { host :  {…} ,  _origin :  6 ,  cursors :  {…} ,...

ESRI JS API 4.8 makes default call to unsupported API to generate token.

Image
ESRI Identity Manager, ESRI JS API 4.8 makes default call to unsupported API to generate token. ID calls to  portal/sharing  in stead of  portal/sharing/rest/ for token.

Generate ArcGIS Token By URL Request From ArcGIS Portal, Federated Environment , ESRI JS API and Angular snippets

In my custom angular web application, I had to pull the data from different ArcGIS server environments, say Dev ArcGIS server and Test ArcGIS server environment, some of my items are directly referred from ArcGIS server services and some of them are from Enterprise portal referring the WebMapId and PortalId from both environment (Dev, Test). Servers are in federated environment. To pull the data from different ArcGIS server environment, user must login in each environment. In addition, user must login to get inside the custom application and Enterprise AD Group was set to authenticate users on the custom web application and ArcGIS server environments. So, there will be 3 login attempts (1 –application itself, 2- Dev server/portal, 3- Test server/portal) to use the application, which doesn’t provide good user experience. To improve the better application workflow, I decided to reduce the number of logins required in the application and use AD Username and Password captured du...