|
POST
|
Has anyone else run into the issue in Safari (macOS and iOS) related to top level awaits in modules? This post is less of a question and more of a heads up about a known issue with top level await - https://caniuse.com/?search=top+level+await . I recently ran into the problem while trying to refactor one of our applications to use and import JavaScript modules. If you're using an imported module in your main JavaScript file, the SDK modules imported via await $arcgis.import() will fail if the await statement is at the top level in Safari on macOS and iOS. // main.js
import { method } from "./imported_module.js";
// imported_module.js
// if await await $arcgis.import is at the top
// level of imported_module.js it will fail
const [Map, Basemap, FeatureLayer] = await $arcgis.import([
"@arcgis/core/Map.js",
"@arcgis/core/Basemap.js",
"@arcgis/core/layers/FeatureLayer.js"
]); I was able to workaround this issue by either passing in SDK modules as arguments from the main JavaScript file or wrapping the await $arcgis.import() in an async function. // imported_module.js
// either wrap await await $arcgis.import in an
// async function or pass Esri SDK modules as parameters
// from main.js
async function _createMap(otherParams) {
const [Map, Basemap, FeatureLayer] = await $arcgis.import([
"@arcgis/core/Map.js",
"@arcgis/core/Basemap.js",
"@arcgis/core/layers/FeatureLayer.js"
]);
}
function _createMap(otherParams, Map, Basemap, FeatureLayer) {
// next method, logic, etc.
} Hopefully this helps anyone else that encounters the issue and can add to coding best practices when using the Esri SDK.
... View more
3 weeks ago
|
0
|
2
|
423
|
|
IDEA
|
@Justin If it helps, I'm using version 4.19 and can access the symbol property.
... View more
10-20-2021
10:08 AM
|
0
|
0
|
6154
|
|
POST
|
You might be able to use the MapView.toScreen() method to convert the lat/lon to a ScreenPoint. Add the 50 pixels to the x,y screen coordinates and then use MapView.toMap() method to convert the adjusted screen point back to a map point and update the graphics geometry. There's also a padding property on the MapView - .
... View more
06-28-2021
08:20 AM
|
1
|
0
|
1585
|
|
POST
|
I've had initial success with using a FeatureLayer to query a point's geometry, manually setting the returned geometry as the popup's features. Then watching the view's scale and resetting the popup's location property using the popup's selectedFeature property. I also added a function to offset the popup anchor if you're using a symbol with a yoffset. const createOffsetGeom = (args) => {
const { geometry, yoffset = 0, xoffset = 0 } = args;
const screenPoint = view.toScreen(geometry);
let offsetGeom = {};
screenPoint.y = screenPoint.y + yoffset;
screenPoint.x = screenPoint.x + xoffset;
offsetGeom = view.toMap(screenPoint)
return { latitude: offsetGeom.latitude, longitude: offsetGeom.longitude };
};
view.watch("scale", (scale) => {
if (view.popup.visible) {
view.popup.location = createOffsetGeom({ geometry:
view.popup.selectedFeature.geometry, yoffset: -18 });
}
}); It seems the geometry returned with hitTest is more generalized when you click on the map at smaller scale.
... View more
05-28-2021
01:02 PM
|
0
|
0
|
1562
|
|
IDEA
|
The ability to make clusters distinct from individual points would be immensely helpful. Clustering in it's current form is a great addition to the API, but not being able to simply change the symbol for the distinct cluster is a limitation among a feature with a great deal of useful complexity (like querying the features within a cluster and creating a convex hull).
Would the development team please consider exposing all rendering properties, including the symbol property, in FeatureReductionCluster?
... View more
05-20-2021
06:37 AM
|
2
|
3
|
2589
|
|
POST
|
Apparently there's an undocumented symbol property in FeatureReductionCluster - https://community.esri.com/t5/arcgis-api-for-javascript-ideas/arcgis-javascript-4-cluster-renderer/idc-p/1059638#M48
... View more
05-19-2021
01:02 PM
|
0
|
0
|
2491
|
|
POST
|
Apparently there's an undocumented symbol property in FeatureReductionCluster - https://community.esri.com/t5/arcgis-api-for-javascript-ideas/arcgis-javascript-4-cluster-renderer/idc-p/1059638#M48
... View more
05-19-2021
01:00 PM
|
0
|
0
|
1386
|
|
IDEA
|
Can you please make the "symbol" property on the FeatureReductionCluster documented and supported in the next version?
... View more
05-19-2021
12:55 PM
|
0
|
0
|
6857
|
|
POST
|
Hello Everyone, I'm checking to see if anyone else has also experienced this issue in 4.15 when setting the SimpleFillSymbol symbol style to "none". In previous versions you could click through the polygon to layers beneath it because it had no fill when set to none. But now the click in the polygon is detected even if there is no fill. Did I miss something? It's been a bit of a Monday. Here's my renderer: featurelayer.renderer = { label: value.name, type: "simple", // autocasts as new SimpleRenderer() symbol: { type: "simple-fill", style: "none", outline: { cap: "round", join: "round", color: [0, 56, 101, 1], width: 2, }, }, };
... View more
04-20-2020
11:56 AM
|
0
|
0
|
1178
|
|
POST
|
Hi Heather, Yes, your map rotates on an iPad Pro (Safari, iOS 11.4) but not on an iPhone (Safari, iOS 11.4.1).
... View more
07-24-2018
11:25 AM
|
0
|
0
|
2492
|
|
POST
|
Yes, I tried it with the 4.7 vector tile sample on my Macbook Pro (late 2011) using Chrome 67. As I dug deeper into the issue, Chrome blacklists certain GPUs due to processing issues, etc. and WebGL isn't supported/is disabled. The GPU (HD3000) on my Macbook Pro happens to be one of the blacklisted ones. So it appears to be not only an issue of the client browser possibly having WebGL disabled, it could also be a hardware issue.
... View more
07-03-2018
05:36 AM
|
1
|
0
|
2045
|
|
POST
|
Turns out WebGL is disabled in Chrome (v67) on Mac OS and is probably causing the issue. I disabled WebGL in Chrome on Windows and saw the same errors. I'll have to figure out another workaround or possibly push users to another browser.
... View more
06-21-2018
06:00 AM
|
0
|
0
|
2045
|
|
POST
|
Has anyone else run into an issue with using Vector Tile layers in Chrome on Mac OS? I'm using vector tile in one of our apps and seeing errors thrown related to Mapbox gl. I also cannot get the Vector Tile sample from the API examples to load either. A WebGL message is being thrown.
... View more
06-20-2018
06:01 PM
|
0
|
3
|
2211
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 05-20-2021 06:37 AM | |
| 1 | 06-28-2021 08:20 AM | |
| 1 | 07-03-2018 05:36 AM | |
| 1 | 04-25-2018 06:38 AM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|