POST
|
Hi Lance, Thanks for the help. I was trying to write the code as explicitly as possible to explain what I'm doing, but appreciate your cleaning it up. That was perfect!
... View more
07-22-2019
01:13 PM
|
0
|
1
|
513
|
POST
|
I'm trying to compare two fields to each other and then use that information to update a third field. Here are the fields that I have in my data: Field A: Direction (numeric) Field B: Bearing (numeric) Field C: KeepDiscardFlag (text) Below is the code that I've tried based on other discussions in GeoNet, but it doesn't work (errors out saying that it couldn't evaluate the python expression). What I'm trying to do is this: Make sure that Direction and Bearing are not null Set the KeepDiscardFlag field to "Keep" if Bearing is between Direction (plus or minus 22.5), or Set the KeepDiscardFlag field to "Delete" if Bearing is not between Direction (plus or minus 22.5) Expression Reclass(!KeepDiscardFlag!, !Direction!, !Bearing!) Code Block def Reclass(KeepDiscardFlag, Direction, Bearing): if ( (Direction is None or Bearing is None) and (Direction - 22.5) <= Bearing <= (Direction + 22.5) 😞 KeepDiscardFlag = "Keep" elif ( (Direction is None or Bearing is None) or (Direction - 22.5) >= Bearing >= (Direction + 22.5) 😞 KeepDiscardFlag = "Delete" Any help would be greatly appreciated!
... View more
07-22-2019
12:33 PM
|
2
|
4
|
1189
|
IDEA
|
It would be really useful to give users the ability to dismiss items that appear in a dashboard when the data comes from a live feed. This would help users of the dashboard that are monitoring live feeds to clear out incidents that they have already responded to and would make the dashboard more interactive. The dismissed items/features would only be local and not flow back into the feature service (kind of like how bookmarks only live in the user's browser and not in the code of the app).
... View more
03-15-2018
06:20 AM
|
2
|
1
|
285
|
POST
|
Hi Jake, Thanks for the link! This worked pretty easily... since I'm building this on a local Portal, I had to go into the Server Admin settings to flip the switch on allowing non-standard SQL first (which updated the change into the Portal). Then I restructured the definition query to a BETWEEN instead of what I originally had and it all worked. Here's the new query that works perfectly: last_edited_date BETWEEN convert(CURRENT_TIMESTAMP()-0.125) AND convert(CURRENT_TIMESTAMP()) Note: The "-0.125" part is 3 hours (or 3/24, or 1/8 of a day). I also changed from GETDATE to CURRENT_TIMESTAMP to avoid a mismatch of timezones between when the feature is edited (since it streams in via GeoEvent and features are automatically tagged in UTC) and the current timezone that I'm in (which is EST, not UTC... CURRENT_TIMESTAMP returns UTC. Just posting this in case someone else needs to reverse engineer the solution. Thanks again!
... View more
05-02-2017
03:13 PM
|
2
|
0
|
1239
|
POST
|
I'm trying to figure out how to filter features that are showing up in a map based on when they were last edited. All of the documentation I have been able to find says that this can't be done in ArcGIS Online or Portal (which is where I'm trying to build the map). What I'd like to do is simply filter the features down to just those that were edited in the last 3 hours, based on the last_edited_date in the data. In SQL, I would just do this: last_edited_date > DATEADD(hh,-3,GETDATE()) ...but this doesn't work. Is there a way to do this via the REST endpoint? I'm thinking that if I can figure out how to set the where clause correctly, I can take the service URL with the where clause, plug it into a map in AGOL, set a refresh on the layer, and boom... done. Any thoughts on how to construct the ?
... View more
05-02-2017
11:54 AM
|
1
|
3
|
3058
|
POST
|
I'm trying to do the same thing but with the newer version of ArcREST (v. 3.0.1) and I keep getting a very vague error message. From the samples provided from the github repo, I edited the delete_rows_from_service.py by adding my username, password, organization URL, AGOL item ID, etc. This is the error: error on line: 49 with error message: AttributeError: 'NoneType' object has no attribute 'starts with' ... and this is line 49: fst = featureservicetools.featureservicetools(securityinfo) Any ideas on how to solve this? I'm using our AGOL admin account so I'm fairly certain it's not a permissions issue. Thanks in advance everyone!
... View more
12-30-2015
09:09 AM
|
0
|
0
|
931
|
POST
|
John, The new samples are great! I was looking at the geocoding sample (here)... very cool! Do you guys have any plans for releasing a sample that shows how to integrate geocoding from a custom service instead of one from AGOL? Don't want to reinvent the wheel here if it's already on your list. Thanks again!
... View more
02-06-2015
10:37 AM
|
0
|
6
|
651
|
POST
|
Hi, Try replacing the URL on line 63 that looks like this:
app.printUrl = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task";
With the URL for the same export web map task service from your local server... like this:
app.printUrl = "http://<YOURSERVER>/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task";
... View more
10-31-2013
11:44 AM
|
0
|
0
|
921
|
POST
|
Yes! The left: 1 property does exactly what I needed. FYI to all: you can't set this to 0. Thanks Derek and Matt!
... View more
10-03-2013
06:33 AM
|
0
|
0
|
321
|
POST
|
What is the best way to control the initial position of the swipeDiv in the Layer Swipe example? I'd like to have our streets basemap displayed first (and fully) when a user opens the app, but then give them the option of seeing both basemaps (streets and imagery) after the app loads. Setting the position of swipeDiv via CSS doesn't seem to work, nor does it seem like the smart thing to do since it's controlling other divs.
... View more
10-02-2013
01:06 PM
|
0
|
4
|
829
|
POST
|
Jeff, I struggled with this for a while and ended up using some jQuery to convert a raw URL into a simple href on the fly. In the code, I search for all of the elements in a table (td) that start with "http://" and then convert them to an href that shows the user a simple "Click here". It has some downsides, but it works for what we need it to do. Here's the code:
function hrefLinks()
{
//Grab all TD elements that have http://
var $tds = $('td:contains("http://")');
$.each($tds, function(i, td){
//each returns a raw element, so wrap in jQuery for convenience
var $td = $(td);
//save original url
var url = $td.html();
//change TD's HTML
$td.html('<a href="' + url + '" target="_blank">Click here</a>');
});
}
function schedule_hrefLinks()
{
setInterval('hrefLinks();', 200);
}
schedule_hrefLinks();
Good luck! Nick
... View more
07-25-2013
11:03 AM
|
0
|
0
|
398
|
POST
|
Hi Steve, Thanks for the input... it wasn't the solution that I was looking for, but still a cool little bit of code that will come in handy. I can imagine using the full screen code you found will be useful when doing presentations on a large screen (when hiding the browser and rest of the desktop is smart). I ended up finding the following slick bit of code that works perfectly: http://menacingcloud.com/source/js/FlameAutoScroll.js Problem solved!
... View more
04-15-2013
09:05 AM
|
0
|
0
|
401
|
POST
|
I'm trying to figure out how to automatically hide the address bar when the map is finished loading. This can easily be accomplished on iPhones by creating a shortcut on the home screen by adding this to the head: [HTML]<meta name="apple-mobile-web-app-capable" content="yes" />[/HTML] But... since I'm trying to make the user experience as consistent as possible (and not force users to create shortcuts) I need to hide the address bar in either case (and not use up valuable screen real estate). Everything I've found so far relies on "scrolling" to the top of the page or setting the height of the page body to a few pixels larger than what is really needed. In a map app, scrolling doesn't apply and the map element is loaded as height:100%... setting the height to 101% or higher doesn't work either (believe me, I've tried). Here's what I've found so far (none of which seem to work in mobile Safari on an iPhone): 1) Adding this meta link in the head although the user-scalable=yes is contrary to the Esri JavaScript samples (where they list user-scalable=0): [HTML]<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=yes;" />[/HTML] 2) Using straight JS to "scroll" to the top of the page function page_Load() { setTimeout(function() { window.scrollTo(0, 1); }, 100); } 3) Wrapping the body in jQuery and using that toolkit to do the same thing as #2: $('body').scrollTop(1); So far, none of these things are working... does anyone know how to successfully hide the address bar automatically (while the device is oriented in portrait)?
... View more
04-12-2013
12:05 PM
|
0
|
2
|
1542
|
POST
|
I too would like to know if this is possible. I'd like to modify the timeslider sample to include popups, but the popups seem to only be configurable on a FeatureLayer and time can only be configured on a DyanmicMapServiceLayer. Does anyone have a solution to this?
... View more
10-26-2011
05:57 AM
|
0
|
0
|
720
|
POST
|
I have primarily focused on web development using the Flex API (utilizing Flash Builder), but am thinking about transitioning toward the Javascript API. The main reason behind this is the need to provide cross-platform accessibility for our main application (we'll still develop using Flex, but those apps will be very task-specific). Does this logic make sense or am I imagining that Javascript is the silver bullet? Of the people that are already utilizing the Javascript API, what development environment do you use? Are there any packages out there that are more WYSIWYG than ones like Aptana? Thanks in advance!
... View more
04-15-2011
10:45 AM
|
0
|
8
|
906
|
Title | Kudos | Posted |
---|---|---|
2 | 05-02-2017 03:13 PM | |
1 | 05-02-2017 11:54 AM | |
2 | 03-15-2018 06:20 AM | |
2 | 07-22-2019 12:33 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|