POST
|
Just getting started with Field Maps. I have a simple webmap (a handful of layers) in ArcGIS Portal (10.9) that is accessible from field maps app running on my iphone. One of the layers is based on an editable feature service running on a federated ArcGIS Server (10.9). For this layer, I am not seeing all the features/records in Field Maps that I can see in Portal and that should be visible. I can see and query them in ArcGIS Server just fine though. Since I can SOME features this isn't a permissions issue. Any ideas what might be going on here? Thanks
... View more
05-24-2022
08:58 AM
|
0
|
3
|
403
|
POST
|
Thanks @BrianLeroux for chiming in. I've changed the default widget size before although not in opOpen(). But I meant would look more like this: I have my custom widget and via button click or whatever event, I pop open a new div - kinda like a menu that opens from a menu bar. Pretty simple, I figured.
... View more
03-31-2022
12:03 PM
|
0
|
0
|
220
|
POST
|
I have been building custom widgets for a few years now and have filled them with buttons, dropdowns, search fields... the usual UI elements. I've put graphs and charts in there, I've used carousel-type slideshows ... but I've managed to cram everything into the same ("main" div) of the custom widget - a widget of whatever default size I've hardcoded. How do I create more widget real estate by popping up a new panel, window, popup that's larger than my widget... basically a <div> that floats above my widget that extends beyond the limits of the widget and can be filled with content. All my attempts to use CSS positioning and z-indexes have failed. I get my <div> alright. I can style it ad nauseam. But it always lives within the size constraints of the parent. The best approach I've come up with - which seems like overkill though - is to have another widget that serves as my extra widget real estate and gets called/opened from the originating widget. That works great and may be what I have to do. But is there a simpler way? If you followed my rambling explanation and have any suggestions, I'll be all ears! Thanks.
... View more
03-29-2022
06:25 PM
|
0
|
2
|
269
|
POST
|
I believe what I have been trying to do here can't be done. It's the way arcgis-map-ipywidget-view.js works and that interacts with my synchronous Python. Here is the JS code. center_long_lat_changed: function(){
///When the center is passed in as a [long,lat] list, add it to the view
///Then watch the view until it changes center into the correct format,
///which we will then update correctly via the _center model attribute
esriLoader.loadModules(["esri/core/watchUtils"],
options).then(([watchUtils]) => {
var _center_long_lat = this.model.get("_center_long_lat");
if(_center_long_lat.length === 2){
console.log("Converting [long, lat] center to standard center...");
//Set up the callback when the view's center is ready for consuption
watchUtils.once(this.activeView, "center", () => {
console.log("Center is converted");
var view_center = JSON.parse(JSON.stringify(this.activeView.center));
this.model.set("_center", view_center);
this.model.set("_center_long_lat", []);
this.model.save_changes();
})
//Actually update the center on the activeView to trigger the above
this.activeView.center = _center_long_lat
}
}).catch((err) =>{
this._displayErrorBox("Error while modifying center_long_lat.");
console.warn("Error on center_long_lat"); console.warn(err);
}); Throw in some break points and look at how lat/lat and X/Y change for this.activeView.center and appears to all be there. My Python code just doesn't wait for things to update. If anyone has a suggestion for a work-around, holler. In the meantime, I'm moving on.
... View more
02-17-2022
06:16 AM
|
0
|
0
|
486
|
POST
|
Ok, I get what you're saying. But I think it doesn't help me along. Sadly, I think this is just another ESRI half baked feature that's either not intuitive at all or buggy. If I do this as in previous example : myMap = mygis.map(location=location_coords, zoomlevel=zoomlevel)
myMap I get a map showing in my notebook. I actually don't need to see the map but I found that certain things don't work unless you actually call the map. So I show it. Now, a simplified version of what I tried previously looked like this: for loc in [[40,80],[45,85],[50,90]]:
myMap.center = loc
print(myMap.center)
time.sleep(2) # so I can watch in amazement Here, the map advanced to the new extent, centered around 'loc'. But when calling the center property (and I believe this is a property not a method), I find that it never changes. When, however, I try this: loc = [42,-85]
myMap.center = loc
print(myMap.center)
>>>{'spatialReference': {'latestWkid': 3857, 'wkid': 102100}, 'x': -9684795.6990148, 'y': 5465442.183322752}
=== THEN IN NEW JUPYTER CELL ===
loc = [42,-85]
myMap.center = loc
print(myMap.center)
>>>{'spatialReference': {'latestWkid': 3857, 'wkid': 102100}, 'x': -9128198.245048434, 'y': 5012341.663847516}
=== THEN IN NEW JUPYTER CELL ===
loc = [44,-87]
myMap.center = loc
print(myMap.center)
>>>{'spatialReference': {'latestWkid': 3857, 'wkid': 102100}, 'x': -9462156.717428254, 'y': 5160979.444049782} It works the way I would expect it. The map is updated and shows the new extent (based on center and zoom level) and the map.center property is updated. So I suspect it must somehow have to do with how the map images that's first rendered with gis.map() is referenced from code in the same or other cells and then updated. This may be more of a Jupyter internal thing than the Python API. Who knows. Could be by design but is strikes me as more of a bug than a feature! As always, Dan, thanks for taking the time to take a look. Haven't spent as much time in the ESRI Python world as I'd like to over the last 12 months, so feedback from the Jedi Masters is always appreciated!
... View more
02-15-2022
04:13 PM
|
1
|
1
|
496
|
POST
|
Thanks for stepping away from retirement for a moment, Dan. But I don't know what you mean. The line: myMap.center = new_location_coords appears to re-center the map around new coordinates, i.e. the map updates. But why do these new coordinates not stick for "center"? It's like the setter refreshes the map but does not set the property correctly.
... View more
02-15-2022
05:38 AM
|
0
|
3
|
501
|
POST
|
After using the Python API mostly for admin purpose in the past, I'm getting a little more into weeds of analytical and data science applications. So I put together a routine that works great for a single location (LL) and leverages the a map in Jupyter Notebooks, Basically something like... from arcgis import GIS
portalUrl = r' ... my Portal url '
mygis = GIS(portalUrl)
location_coords = [lat, lon]
zoomlevel = some number
myMap = mygis.map(location=location_coords, zoomlevel=zoomlevel)
myMap This works great and puts out a Web Mercator (EPSG 3857) map that I can add layers to - whatever! What if I want to move/pan to a different location in the map? Say I have a list of locations to process (which I do). The documentation here suggest that I should be able to do the following to shift the map: new_location_coords = [new_lat,new_lon]
myMap.center = new_location_coords This in fact updates the map in the notebook, i.e. pans to the new location centered on the new coordinates. But when I then call: myMap.center I get: {'spatialReference': {'latestWkid': 3857, 'wkid': 102100}, 'x': original value, 'y': original value} where 'original value' the original Web Mercator coordinates from my original Lat/Lon;s. So all the panning does not change the original definition of the map. Am I doing something wrong? Or is this be design or is it a bug? I'd like to be able to use the new center of the map to build some bounding boxes and things like that) but right now, I can't. - Thanks for any feedback.
... View more
02-14-2022
01:04 PM
|
0
|
5
|
540
|
POST
|
Trying to get 'feature search' working. - I have a simple app configured with a web map. This is in Portal 10.9. In the web map, under Application Settings, I have a layer and attribute set up to work with feature search. But when I try to get this set up in the web app settings (Search tab) of a Basic Viewer ... all I can do is give the URL parameter a name. There is no way to pick/designate a layer as per the instructions here. Any idea what I might be missing? Thanks.
... View more
11-24-2021
09:44 AM
|
0
|
1
|
505
|
POST
|
The only way to overcome this behavior was by adding an event handler for zooming that creates a new graphic from the existing one, clear the layer and then adds the new graphic. It works but hey, it's workaround for unexplainable behavior.
... View more
11-11-2021
02:45 PM
|
0
|
0
|
191
|
POST
|
Just came across this myself... never seen it before. Adding a single polyline graphic to a graphics layer and than zooming in and out creates a cascading series of smaller and/or larger siblings of that graphic. Not sure how else to describe this. I've tried all above suggested fixes. No luck yet. if anyone else has seen this in the last 4 year since the original post, please holler. Using JSAPI 3.31, AGS10.9, WAB2.21.
... View more
11-10-2021
03:10 PM
|
0
|
1
|
193
|
POST
|
Agree with you that this likely goes beyond affecting my work with layout templates. Like the suggestion to post more widely. Will do that and also am enlisting ESRI Support on this. Thanks for taking the time to read my cry for help. Haha, Always appreciated.
... View more
09-14-2021
12:07 PM
|
0
|
0
|
764
|
POST
|
yeah, and if I just went with a different product rather than Pro ... maybe I would never have any of these headaches - haha!
... View more
09-13-2021
04:46 PM
|
0
|
0
|
829
|
POST
|
Is anyone aware of any changes in ArcGIS Pro or arcpy as they might relate to the behavior of web layers (service layers) vs staged vector layers in an APRX when printing to PDF. (Apologies for the crazy jargon - I didn't come up with it.) I have code handling both types of layers in a geoprocessing service handling APRX that worked in 10.6.1 and behaves differently in 10.9. Interestingly, my code failed completely in 10.8.1 which forced me to leapfrog to 10.9. Specifically, I'm noticing that layers from the same JSON seem to be handled differently and result in what looks like a differently ordered stack of layers. As usual, release notes, while shock full of bugfixes related to geoprocessing, layouts, and PDF for 10.8.x, do not provide much of a clue for 10.9. Thanks for any insights. I spent weeks developing this in 10.6.1 and subsequently refining this based on business feedback. After upgrading to 10.9, it feels like back to square zero. Not a good experience. Full disclosure: this is more than marginally related to another question I posted. That other post's direction of inquiry was largely a result of rewriting the above mentioned.
... View more
09-13-2021
04:44 PM
|
0
|
1
|
350
|
POST
|
So someone else explain this to me: I have a Pro project (currently using 2.7.4) with a map in WGS84. To this I add a layer that is NAD27. NAD27 data is transformed on the fly to line up with WGS84 basemap. Great. That's what I've come to expect for many years. Now, I publish this as a map service to ArcGIS Server and create an app using that service. Next, I create a layout template using my Pro map and export to file. Then I use Javascript and Python to create a web map from JSON passed from web app into GP service using my layout (creating in-memory APRX). What I end up with are service layers (from map service) and what I think ESRI has dubbed staged vector layers (from the layout template). The map now basically has set of 2 of each layer. But those staged vector layers, while lining up with basemap in Pro project, no longer line up. They now plot like good ole NAD27 in Web Mercator land. I don't think that layer templates have any record of spatial reference. But is there a way to avoid this? Is this by design? Has this always been like this? I haven't noticed it before. When I export the "in-memory" APRX to file and open in Pro, I see that things don't line up and that no coordinate system transformation has been specified. Well, duh! When I do that in Pro, things snap right back to where I'd like to see them. Is there a way to do do programmatically as part of my geoprocessing logic?
... View more
09-13-2021
04:34 PM
|
0
|
4
|
834
|
Title | Kudos | Posted |
---|---|---|
1 | 10-11-2019 10:59 AM | |
1 | 12-10-2019 02:49 PM | |
1 | 06-18-2020 06:24 AM | |
1 | 01-09-2023 01:24 PM | |
1 | 01-09-2020 03:26 PM |
Online Status |
Offline
|
Date Last Visited |
yesterday
|