|
POST
|
I'm not completely sure that this is the issue, but I think this may have to do with how the JS API typings work with "autocasting." The signature for the basemap property is not string, it looks like: interface BasemapProperties extends LoadableProperties {
baseLayers?: Collection;
id?: string;
loaded?: boolean;
portalItem?: PortalItemProperties;
referenceLayers?: Collection;
thumbnailUrl?: string;
title?: string;
} This means that although a string is valid for a basemap in javascript, it's not valid in typescript. This issue discusses some workarounds: Typings for basemap not matching actual javascript · Issue #77 · Esri/jsapi-resources · GitHub You could try passing in { id: "streets" } to the basemap property. It may accept that. You could also try one of the workarounds in that github issue.
... View more
07-31-2017
01:49 PM
|
0
|
1
|
1887
|
|
POST
|
What is the error? I'm not familiar with visual studio, but can you mouse over the underlined code to display the error?
... View more
07-31-2017
12:19 PM
|
0
|
3
|
1887
|
|
POST
|
I've noticed this. It seems to have to do with the order that the elevation and the labels are drawn. As you zoom in and out, the elevation updates and the terrain will shift. The labels appear not to be shifting with the terrain.
... View more
07-28-2017
09:37 AM
|
0
|
0
|
5803
|
|
POST
|
There is no feature table in 4.XX (yet). Also, the 4.XX API uses "widgets" in place of "dijits."
... View more
07-27-2017
10:43 AM
|
1
|
1
|
1536
|
|
POST
|
How is the first user "passing the items" to the second user? My initial reaction is that the right way to do this is to pass a query around. So, user A picks out 3 items from their contents and you build a query that searches ArcGIS Online, something like: id: <item_1_id> OR id: <item_2_id> OR id: <item_3_id> Then user B, who is viewing the items, executes the query that user A built. They will only get a response for items that they have access to.
... View more
07-26-2017
01:58 PM
|
0
|
1
|
1947
|
|
POST
|
One option would just be to adjust the time. IE: make it night time at the user's position when night is toggled on and make it day time when day is toggled on. I don't know of a way to influence ambient light.
... View more
07-25-2017
10:22 AM
|
0
|
0
|
2360
|
|
POST
|
There doesn't seem to be a lot of user-facing options for these things. There are various things you could do to obstruct the scene from shadowing the side of the earth opposite the sun. For example: JS Bin - Collaborative JavaScript Debugging That sample modifies a function on the environment manager so that it doesn't have a reference position for the camera and therefore falls back to generic lighting settings (entire earth is illuminated). It's not clear to me that's what you're looking for, though. One option would be to call that code to modify that function under certain circumstances and then revert to the prototype function when you want normal lighting to resume. It can be "dangerous" to play with this kind of stuff as a bug in your codes results in the view freezing with no error message.
... View more
07-25-2017
08:42 AM
|
1
|
2
|
2360
|
|
POST
|
Hmm, that's a harder problem. Thinking about it, there should be a way to figure out of the center of each tile if you know the row, column, origin, and resolution. Speaking generally, I would think that the x, y would be (col + .5) * resolution, (row + .5) * resolution (assuming the tile coordinates are 0 based). But I'm unsure how the "tile grid" is oriented compared to the web mercator x, y axis. Maybe you can figure this out based on the origin that is passed into the TileInfo. I'll take a look at the source code and see if I can find an example of this being done.
... View more
07-24-2017
12:21 PM
|
0
|
0
|
2316
|
|
POST
|
Here's my attempt to reproduce: JS Bin - Collaborative JavaScript Debugging - click map to perform a search. Everything seems to be working normally. I'm only doing this for a single point feature service though. I would try calling graphicsLayer.add() for each graphic in the returned featureSet rather than setting the .graphics property equal to featureSet.features. I couldn't get the "highlight" graphics to show up at all, even with a redraw, using the method you posted.
... View more
07-21-2017
01:45 PM
|
0
|
0
|
3904
|
|
POST
|
There's a Layer.fromPortalItem function in 4.XX but not in 3.XX as far as I know. You may just have to call a different function based on the item type for each item in my contents.
... View more
07-21-2017
09:46 AM
|
0
|
1
|
1442
|
|
POST
|
You can generate a PDF in the browser using javascript. There are many third party libraries that can help with this like: GitHub - MrRio/jsPDF: Client-side JavaScript PDF generation for everyone. I imagine you could build a table based on arbitrary data in a PDF using that library (or another similar one). I'm unsure if there's an easier way to do this than basically building the PDF from scratch.
... View more
07-21-2017
07:58 AM
|
1
|
0
|
1790
|
|
POST
|
Thanks for the information, I'll try to reproduce this later today.
... View more
07-21-2017
07:11 AM
|
0
|
2
|
3904
|
|
POST
|
Here's a sample that draws each tile's extent as the tiles update (ie as you zoom in and out) JS Bin - Collaborative JavaScript Debugging You could draw the center of each extent rather than the extent itself.
... View more
07-21-2017
07:08 AM
|
1
|
0
|
2316
|
|
POST
|
I've run into a similar issue that may or may not be related (in my case I didn't notice any relation to zoom scale). I was creating a graphics layer, adding graphics to it, clearing it, and adding more graphics all within a very small timespan. The result was that some graphics would get "stuck" nondeterministically (from my perspective anyway) i.e. they'd be visible in the view but were nowhere to be found in any graphics collection, and calling graphicsLayer.clear() did nothing. I fixed this by ensuring that the graphics were not cleared and added within the same fraction of a second (about 100 ms). The thing to do is probably to try to reproduce this in a sandbox: 1. You're using the 4.4 API, correct? Map View or Scene View? 2. What method are you using to search for nearest graphics? 3. What method are you using to highlight graphics? 4. The graphics layer in question holds the highlights, correct? Any sample code or pseudocode would also be helpful to replicate this.
... View more
07-20-2017
10:16 AM
|
2
|
4
|
3904
|
|
POST
|
Your sample seems to work fine for me (checked with chrome and firefox).
... View more
07-20-2017
05:55 AM
|
0
|
0
|
654
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-03-2017 08:23 AM | |
| 1 | 11-02-2017 08:36 AM | |
| 1 | 11-02-2017 09:23 AM | |
| 1 | 09-20-2017 02:07 PM | |
| 1 | 10-06-2017 05:54 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:24 AM
|