|
POST
|
Oh yeah, the sample page is raw, totally unstyled, as you saw. Wanted to keep it as simple as I could and leave the styling up to you. 🙂 As for the map number 001-999, sounds like you want a text box instead of a pull-down. I adjusted the code. Check the page source behind the app sample I linked above: https://jimbarry.github.io/mapbook The changes are on Lines 32-42: <div> <label for="mapnumb">Enter a map number:</label> <input type="text" id="mapnumb" value="001">(ie. 001-999)</input> <!-- new --> <!-- <select id="mapnumb"> <option value="001">001</option> <option value="002">002</option> <option value="003">003</option> </select> --> </div> Ok so, how to deal with the contents of the Excel spreadsheet that may change from time to time, and which holds the full list of information about map book numbers, map page numbers, and PDF URLs. So, since this is a web page, that information is going to need to be http accessible, or readable by a web browser somehow. If the number of map books is always going to be 1-N and the number of map pages is always going to be 1-999, and the URL paths to the PDFs are always going to follow some type of consistent naming pattern, like in my sample app above: "https://<domain>/<folder>/<map-book-number>/<map-number>.pdf", then you don't really need to load the xlsx/csv. If the mapbook and map number the user enters is valid, at that moment, then it'll return the PDF. But... if the URL paths to the PDFs don't follow that kind of pattern, then I'm assuming in your xlsx, there's a mapbook column, a map number column, and a column that holds the URL where that map page is. In which case converting the xlsx into a csv could be a way to go. Here is a sample that shows one way to read the csv. Then, instead of drawing the csv to the page (like that sample does), you could read it all into a two-dimensional array, then when the user chooses a map book and map number, you do a lookup in that array, pull the correct URL out of the array, and open the PDF in the window. Tons of different ways to do this. That's just one.
... View more
05-07-2020
02:05 PM
|
0
|
0
|
1918
|
|
POST
|
There's probably 1,000 different ways to do this, but this might be a decent start: https://jimbarry.github.io/mapbook If you'd rather build the mapbook and map numbers pulldowns on the fly (perhaps the content changes a lot?), I'd recommend converting to CSV or JSON first to make the data easier to use in a web app rather than trying to work with it in Excel format directly. If the content in the sheet doesn't change much, might be easier to hardcode it all in the web app as shown in the sample above.
... View more
05-05-2020
01:29 AM
|
0
|
2
|
1918
|
|
POST
|
>>We've looked at the API but could not find anything that converts state plane to lat-long.The best thing we figured out was to use our own geometry service. Sounds like you're trying to project individual geometries, and I'm also assuming from that above you'd rather do this client-side than call GeometryService. If so, then the esri/geometry/projection module's project() method should work. Sample code in this doc as well: projection | ArcGIS API for JavaScript 4.15 You just need to know the wkid of both the "from" and the "to" coordinate systems, and if those coordinate systems are using different datums, for best accuracy, you're also going to mix in a geographic transformation.
... View more
04-15-2020
05:15 PM
|
0
|
0
|
2275
|
|
POST
|
Here's a tip for troubleshooting which layer might be causing your problem with the login window: https://community.esri.com/people/jbarry-esristaff/blog/2020/04/08/tip-load-layers-using-portal-item-id-versus-rest-endpoint-uri
... View more
04-08-2020
01:27 PM
|
0
|
0
|
1302
|
|
BLOG
|
When using the ArcGIS API for JavaScript (v4), and creating ~Layer objects, there are two ways to connect to the resource, either by loading the portal item by its portal ID, or by calling the REST endpoint URI directly: var fl = new FeatureLayer({
portalItem: {
id: 'a624a764295e4887b096ab7972b7bd8f'
}
});
// OR...
var fl = new FeatureLayer({
url: "https://services6.arcgis.com/0p6i4J6xhQas4Unf/arcgis/rest/services/SI_TRACKS/FeatureServer"
}); In either case, any rendering, popups, or other settings and configuration that you've saved back with the layer will come through. If a layer or other resource in the app/page has some sharing perms set on it, making it only accessible by the Owner, or an Organization or Group within, it's by design that the API will open up a modal login dialog to see if the user is allowed to access that resource. One advantage to loading the layer using its portal ID is when it comes to figuring out which layers are opening a modal dialog when you're not expecting them to. If your map contains many layers, this can be a bit of troubleshooting. If you created the layer using the url property, the modal login dialog will look like this: Not very useful. But, if you created the layer using the portalItem property, the modal login dialog will look like this: Very useful. The dialog tells you right there exactly which Portal Item it is trying to open. You can go back into your code or your Content tab and find the layer that may not have its sharing permissions set as you expected. Or perhaps it's an item owned by some other person or organization. Or maybe the content used to exist, and doesn't any longer, and maybe then you can find the source data and rehost it yourself, then change the path/ID. Or just drop that item altogether if maybe it's no longer needed for your map or app. There may be other pros and cons for creating layers with url or portalItem, but this here is a case where loading by portalItem gives you useful info for troubleshooting.
... View more
04-08-2020
01:25 PM
|
2
|
0
|
2055
|
|
POST
|
It's on our plan for 2020. Might not be the next release, but something being worked on.
... View more
03-11-2020
02:51 PM
|
3
|
0
|
2022
|
|
POST
|
Sorry for the delay on this. Checking with the dev team to see what they say.
... View more
03-11-2020
01:09 PM
|
0
|
0
|
2022
|
|
POST
|
This can be done with v1.7.1 now. The Group class has a categories property, that gives you access to the CategorySchemaManager for that group. Then you can use the .assign_to_items() method to assign group categories to items that belong to the group.
... View more
02-18-2020
04:41 PM
|
1
|
1
|
9358
|
|
POST
|
Hi Xander!! Oh, that's neat. Thanks for the script. Nice use of modulus, and creative example of doing the same without it. Here's a slide deck I used, giving an Intro to Arcade 30-min session at the Mid-Atlantic User Conference a few weeks ago: Arcade: an Introduction - Esri MUC 2019
... View more
01-02-2020
02:28 PM
|
2
|
1
|
5047
|
|
POST
|
User error. Arcade doesn't need a Mod() function. It already has a "%" Modulus operator.
... View more
12-23-2019
02:06 PM
|
2
|
3
|
5047
|
|
POST
|
Seems Arcade doesn't yet have a math function, like, say: Mod(value, modulo) -> Number Anyone have a creative function for calculating one using the existing math functions? Thanks!
... View more
12-23-2019
01:03 PM
|
0
|
4
|
5268
|
|
POST
|
Here goes. Inside the .zip are 3 PDFs. Dropbox - GT_formula_maps.zip - Simplify your life
... View more
12-06-2019
11:04 AM
|
0
|
1
|
1836
|
|
POST
|
Matt: Sorry for the delay. I just noticed this message today. I don't have it in my ArcScripts database, but Rob Burke from Esri is the one who uploaded that back in 2007. I just sent him an email asking if maybe he still has it. - Jim
... View more
12-05-2019
03:59 PM
|
0
|
2
|
1836
|
|
POST
|
Perfect!! Thanks Robert!! No I hadn't figured it out yet. I had never really learned how things work at 3x, so I get stumped from time to time. Seems the key I was missing was: var webMapLayers = arcgisUtils.getLayerList(response); ...within the .createMap() block. Because from your code, it seems that once you have the layer out of that layer list, then .setDefinitionExpression() works the same. Oh, and yeah, the part about building the expression with "IN" rather than chaining "OR"s, just better. My head wasn't on that part of the problem, so thanks for that too. Also the array.join() method, very handy. Haven't spoken in quite a while. I hope things are going well. 🙂
... View more
11-05-2019
11:13 AM
|
0
|
0
|
3271
|
|
POST
|
Attn: JS API 3.x Anyone have a sample for setting a definition expression on a feature layer in a web map? I'd like to give my end-user a multiselect pick list of unique values in a column and have the layer within the web map filter its features based on that where clause. Here is an example of how it works when you load the FeatureLayer through code directly: https://codepen.io/JimBarry/pen/eYYyBya But not when the layer is inside a web map. Thanks!
... View more
11-04-2019
11:50 AM
|
0
|
2
|
3371
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-10-2025 07:50 AM | |
| 3 | 06-10-2025 06:29 AM | |
| 2 | 06-06-2025 12:12 PM | |
| 2 | 04-11-2025 09:33 AM | |
| 1 | 09-25-2024 02:25 PM |
| Online Status |
Offline
|
| Date Last Visited |
a week ago
|