|
POST
|
Yes, 4.x.. tried to add that as a tag in OP. Is there a similar approach in 4.x?
... View more
04-20-2020
08:25 AM
|
0
|
5
|
4144
|
|
POST
|
For some reason I am having a hard time in getting the import to resolve; is there a specific order this one should be called? import ScreenPoint from "esri/geometry/ScreenPoint";
... View more
04-20-2020
08:19 AM
|
0
|
7
|
4144
|
|
POST
|
Gotchya. It is reported Uncaught ReferenceError: ScreenPoint is not defined
... View more
04-20-2020
07:29 AM
|
0
|
9
|
4144
|
|
POST
|
Thanks, I thought that may have been depreciated. So how may that apply to the below scenario for instance? let ktop = $('elem').offset().top; let ktlft = $('elem').offset().left; coordinatesBx = ktop, coordinatesBy = ktlft
... View more
04-20-2020
06:14 AM
|
0
|
1
|
4144
|
|
POST
|
My map takes up 100% width and height of the browser screen.. I have a draggable div that is super imposed over the map, I am capturing this divs position using offset() ; to get the pixel top and left values currently. My goals would be to convert these values to latitude and longitude ... Could something like this be possible?
... View more
04-20-2020
05:18 AM
|
0
|
13
|
5473
|
|
POST
|
Thanks so much for the response! Is there any demo to this usage? For some reason, no matter what I do, or which method I implement, I console log my line graphic's index via the below and it is always -1. const drawlineLP = myAPP.mapview.map.layers.findIndex(layer => { return layer.id === 'drawLine'; }); console.log(drawlineLP);
... View more
04-17-2020
10:06 AM
|
0
|
2
|
4477
|
|
POST
|
I have created a simple polyline line graphic layer, i.e. below: const polyline = { type: "polyline", paths: [ [lineY, lineX], [coordinatesBx, coordinatesBy] ] }; const polylineGraphic = new Graphic({ geometry: polyline, symbol: simpleLineSymbol, id: "drawLine" }); graphicsLayer.add(polylineGraphic); The problem is, it's going behind some elements... when it shouldn't be. It needs to be the second to top layer. For instance, I only want my modals to have a higher index then my new line here. But if second to top is too low level; I could probably figure it out if I could simply know how make it the highest index (or on top of everything). I am having trouble toggling it's index position at all with the below two methods. Most recently I have tried the below moveItem method. And did not see any effect... I have also tried the reorderLayer method, but anytime I use that I get 'reorderLayer' is not a function (perhaps because it is 3.x technique and I am on 4.x?). //Gets the item in the 0 index let drawLinegraphic = polylineGraphic.graphics.getItemAt(0); //moves it to the 5 index polylineGraphic.graphics.moveItem(drawLinegraphic, 5);
... View more
04-16-2020
11:44 AM
|
0
|
4
|
4557
|
|
POST
|
Thanks Robert. Just stand alone like that? I am getting view undefined.
... View more
03-09-2020
01:48 PM
|
0
|
1
|
1188
|
|
POST
|
Thank you Robert; I am invoking it originally with the below code and find it useful to keep due to its location and load time. How can I keep it invoked this way, but disable the current functionality affiliated with zoom. You can see I am trying to use return false and also preventDefault(); in effort to do this. function addHome(view) { const home = new Home({ view: view }); view.ui.add(home, 'top-left'); event.preventDefault(); return false; }
... View more
03-09-2020
12:27 PM
|
0
|
1
|
1188
|
|
POST
|
Wondering if it is possible to keep my 'home' widget; but remove the functionality set where it 'returns' to a zoom level and position on my map. i.e. I want to just keep the icon (for now). https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html
... View more
03-07-2020
02:41 PM
|
0
|
5
|
1337
|
|
POST
|
Thanks Robert, any idea on how to do something similar with all my filtering? How could I programatically find the following in the console, similar to how I am searching my layers: i.e. featureLayerView.filter i.e. FeatureFilter | ArcGIS API for JavaScript 4.14 - I can't find this in the console with the similar syntax i.e. below myApp.mapview.map.findLayerById('cool_layer').visible = true;
... View more
03-05-2020
05:16 PM
|
0
|
1
|
3343
|
|
POST
|
The below finds my layer and shows visible property in the console, when I toggle it there from ' true ' or ' false ' it changes. myApp.mapview.map.findLayerById('cool_layer'); But when I run the below line, I can toggle my layers on or off individually, but how could I loop through all of them, and turn them all off? I am trying tocreate a 'reset' button. myApp.mapview.map.findLayerById('cool_layer').visible = true; javascript arcgis-javascript-api arcgis-javascript-api-4 shareeditdeleteflag
... View more
03-05-2020
12:27 PM
|
0
|
3
|
3479
|
|
POST
|
The goal is to save the state of a basemap from the basemap gallery, then re-render it later. I have done this sucesfully with all my basemap using the below portalItem.id however there are a few basemaps with null portalItem object (i.e. no portalItem.id (arcgis 4.x) basemapGallery.activeBasemap = {portalItem: {id: "588f0e0acc514c11bc7c898fed9fc651"}}; i.e. baseLayers: (...)id: (...)load: ƒ ()loadError: (...)loadStatus: (...)loadWarnings: (...)loaded: (...)**portalItem: null** Is there anything I could do to create some-type of handler so I can save my selection of these maps as well, then re-render later as I am doing with the others? I have tried setting a portalItem in the below format, but still fails. Anything I could here? if (newBasemap.id === 'shaded_relief_light') { } else if (newBasemap.id === 'shaded_relief_dark') { } else if (newBasemap.id === 'world_nav_charts') { } else if (newBasemap.id === 'skyvector_hi_map') { } else if (newBasemap.id === 'skyvector_lo_map') { } if (newBasemap.id === 'skyvector_vfr_map') { } I have also tried generating ones for those few that do not have them. if (myCoolApp.widgets.basemapManager.basemapGallery.activeBasemap.portalItem) { basemapSaved = myCoolApp.widgets.basemapManager.basemapGallery.activeBasemap.portalItem.id; coolGuy.baseMapId = basemapSaved; } else { let r = Math.random().toString(36).substring(7); myCoolApp.widgets.basemapManager.basemapGallery.activeBasemap.portalItem.id = r console.log(r); }
... View more
02-21-2020
03:03 PM
|
0
|
0
|
740
|
|
POST
|
I can toggle the active basemap programmatically via the below: But how can I also include to show or hide LABELS programmatically with the below? myApp.widgets.basemapManager.basemapGallery.activeBasemap = { portalItem: { id: baseMapId }
... View more
02-12-2020
09:16 AM
|
0
|
0
|
677
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-17-2020 03:59 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|