4

I would calculate the spatial difference between the area of interest and view extent, and display it as greyed-out. Something like this: var polygon = new Polygon({ rings: [ [-118.818984489994, 34.0137559967283], [-118.806796597377, 34.0215816298725], [-118.791432890735, 34.0163883241613], [-118.79596686535, 34....


3

require(["dojo/_base/lang"], function(lang){ var myObj = { //A simple object with the property of foo foo: "bar" }; var func = lang.hitch(myObj, function(){ //Using lang.hitch we can point to the scope that we want. Now "this" is pointing to myObj console.log(this.foo);//Grabbing the contents of ...


3

Given the coordinate as you stated, you could use the Mapview.toScreen function to get the screen point and then use hitTest which takes either a mouseEvent or a screen point. Something like this should work. var mapPoint = { x: -49.97, y: 41.73, spatialReference:{ wkid: 4326 } }; var screenPoint = view.toScreen(mapPoint); view.hitTest(...


3

I think, theoretically, it is possible to npm install JS API from Esri GitHub repository, and before making a Custom Build of JS API edit strings in localization files — they are situated in t9n folders. https://github.com/Esri/arcgis-js-api/tree/4master Second approach, for widgets, is to create your own view and use your own localization and UI components. ...


3

The question seems to be asked earlier here https://stackoverflow.com/questions/45167863/how-to-load-an-geotiff-image-over-google-map, https://stackoverflow.com/questions/19492967/georeference-tiff-image-into-the-google-map and https://stackoverflow.com/questions/44493354/overlaying-a-rasterfile-tiff-into-google-map here. Google docs reveal that you can ...


2

The documentation is incorrect and will be fixed. You can use UniqueValueRenderer just fine with GeoJSONLayer. No need to convert the GeoJSON.


2

I am not quite sure what is self.esriHelper.requireModule, it seems like an util function to load modules. If that's the case then the return is a class not an object. Extent update function works on an extent object, because it updates the values of the caller, in other words it doesn't work on a class. You need something like this, var esriGeometryExtent = ...


2

@Kirk's answer works and is simple, but I didn't like that it would zoom all the way in and then zoom out a little. The method I can up with is to find the map extent at the smallest scale and compare that to my extent. If my extent is larger, then I can safely zoom to extent. If my extent is smaller, then I zoom to whatever zoom level desired. ... ...


2

A friend reached out to me and wrote a new code in Python for me. For me before I always left it as VB with the other code. Thanks for the post BERA. str(int(!ET_STATION!/1000))+" + " + str(int(round((((!ET_STATION!/1000) - int(int(!ET_STATION!)/1000))*1000),1)))


2

This is a known limitation of the print service. If a Raster or Imagery layer has a pixel filter, the updated values will not be acknowledged by the print service. In ArcGIS API for JavaScript 4.x, we have a workaround where you can use a view.takeScreenshot() method: https://developers.arcgis.com/javascript/latest/sample-code/sceneview-screenshot/index.html ...


2

Robert Scheitlin answered a similar question on https://community.esri.com/t5/arcgis-web-appbuilder-questions/lang-hitch-what-does-it-do/m-p/436487 lang.hitch enables you to keep a code block in scope. Say you have a function that has a inline function and you want to call this.map to get a refernec to the map object well if you are calling this.map from ...


2

You have some issues to resolve in order to achieve what you want. The first thing is that sidebar is not using the ui provide by the library, you are positioning it by yourself. So, if you want to hide it, you also need to do it by yourself. Using the widthBreakpoint of the view, you could do something like this, view.watch("widthBreakpoint", ...


1

In order to achieve what you are looking for, you need to start the action using the create method of the widget (ArcGIS API - Sketch Widget). This is a possible way of doing it, let handle = null; handle = sketch.watch("state", state => { console.log(state); if (state === "ready") { sketch.create("polygon"); ...


1

After much experimentation, I determined that the problem was mainly caused by the ESRI css. I used the developer console in Chrome to find the exact class(es) that were being effective and changed, primarily the position from fixed/absolute to inherit. I still have an issue with the << button displaying too large but the below code fixed the view ...


1

No, the Legend widget doesn't work that way. It is based off the layer's renderer. "Labels and their corresponding symbols depend on the values set in the Renderer of the layer." -- From https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Legend.html If you really wanted that behavior, I guess in theory you could update ...


1

The arcgis js api has the hitTest function in views, you can use that to get all the layers under the mouse click and create a new popup with all the data you want to show. Using something like this should work for simple objectid showing of every layer: var hitResults; var popupContent ='' view.on("click", function(event) { hitResults=[] ...


1

You actually almost got it. The problem in your code is that you are using template2 in the feature layer flayer. In order to get the result you want, use template for flayer, const fLayer = new FeatureLayer({ portalItem: { id: "b5665da3feab4b6091914cbfe4ab028f" }, popupTemplate: template, // <- template for popup layerId: 0, ...


1

I think you are talking about the basemap. The example uses ESRI World Imagery service, and it is set on map creation, const map = new Map({ basemap: "satellite", // <- here layers: [layer] }); ArcGIS API - Map basemap


1

Seems that this was a bug with ArcGIS JavaScript API and it was fixed with the release of JS API 4.15. I just changed my app to use 4.15.


1

You just need to assign a popup template to any sublayer you want to present information on their features. Take a look at this example I made for you, <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"> <title>ArcGIS API for ...


1

As confirmed by ArcGIS Dev on Forum, as of 4.16 Cluster do not support to getChildGraphics of cluster and also do not support different renderer for cluster.


1

This was a security enhancement and should be expected going forwarded. The HTML sanitizer was added to all widgets to sanitize and escape strings according to the ArcGIS Online supported HTML specification. This can cause HTML set in PopupTemplate.content or in other widgets to be removed. https://developers.arcgis.com/javascript/latest/guide/4.14/index....


1

This was answered by Anne Fritz from Esri in an email to me: This is not currently possible for CIMSymbol. You could add labels to your FeatureLayer instead of doing it through the CIMSymbol. See this example: Add labels to a FeatureLayer | ArcGIS API for JavaScript 4.15 There's more information available in the API Reference: FeatureLayer....


1

I noticed that the map has an "optimizePanAnimation" constructor option that can be set to false to help with panning within the same zoom level. Here's a link to the documentation. Search the page for "optimizePanAnimation", it's kind of hidden in there. https://developers.arcgis.com/javascript/3/jsapi/map-amd.html I've been playing around with that ...


Only top voted, non community-wiki answers of a minimum length are eligible