POST
|
I've had an ongoing issue with my web application in mobile Safari in all versions of the JavaScript API from at least 4.13-4.23. Occasionally, I receive the JavaScript error "Cant find variable: require", followed by "null is not an object (evaluating 'Z.parentNode.insertBefore')". These errors are thrown in the ESRI libraries. After this error, the map fails to load. This doesn't occur all the time and I can get the map to load if I refresh the page several times. It only occurs in mobile Safari from what I can see. I assume that something with Node is not loading when I try to load the ESRI library but I don't know how to get around this. I am loading the ArcGIS libraries from https://js.arcgis.com/4.23/.
... View more
06-28-2022
07:10 AM
|
0
|
1
|
242
|
POST
|
Yes, using the arrow function allows the images to load when the popup is clicked instead of all at once when the page loads although I'm not clear why. Thanks for your help!
... View more
06-15-2022
12:44 PM
|
0
|
0
|
721
|
POST
|
Let me clarify a bit regarding the way I'm trying to do this. I have a function that creates the div with the dynamic content: function getDynamicContent(content) {
var div = document.createElement("div");
div.innerHTML = content;
return div;
} For each of my Graphic items, I create a popupTemplate and call my function like this: for (var i = 0; i < myCustomData.length; i++) {
popuptemplate.content = getDynamicContent(myCustomData[i]);
// code for initializing the point Graphic here.
...
} So I call getDynamicContent for each of my array items, one of which is an image URL, and it renders all the images as it loads the map--not when the popup is clicked. I'm sure there's something I can do differently with the way my JavaScript is structured but I'm not quite sure what that is.
... View more
06-15-2022
12:27 PM
|
0
|
2
|
727
|
POST
|
I'm displaying popups with images that also have some JavaScript events associated with them (onmouseover, omouseout events). In order to get the JavaScript events through the sanitizer in v4.23, I dynamically create a DOM element for my content like this: popuptemplate.content = function(){
var div = document.createElement("div");
div.innerHTML = { my dynamic content, including the image URL, goes here };
return div;
} While this method outputs the events, it also preloads all of my images when the page loads (over 1000 images). I only want to load the image when the popup is clicked and still be able to keep my events associated with the image. How can I accomplish this?
... View more
06-15-2022
10:36 AM
|
0
|
4
|
748
|
POST
|
I'm using the NOAA NowCOAST ArcGIS web service to overlay the latest weather radar on version 4.13 of a JavaScript ESRI Map like this: weatherOverlay = new MapImageLayer({ url: "https://nowcoast.noaa.gov/arcgis/rest/services/nowcoast/radar_meteo_imagery_nexrad_time/MapServer/", title: "Weather Radar Layer", opacity: .7 }); This correctly displays the most current version of the radar on my map. However, I'd like to be able to call the service to obtain historical radar as well (the previous hour every few minutes). Using this web service, how do I pass parameters in order to obtain historical renderings of the radar?
... View more
02-11-2020
01:03 PM
|
0
|
0
|
627
|
POST
|
Thanks, geometryEngine.union() works with your advice. The explicit cast to a Polygon before pushing it into my array is what was missing in my code.
... View more
02-04-2020
06:31 PM
|
0
|
0
|
2773
|
POST
|
I'm trying to use geometryEngine.union() with no success. I have several polygons defined like this where paths is an array of lat/long coordinates: var polygon = { type: "polygon", rings: paths }; I then push each polygon into an array like this: polygons.push(polygon); At that point I use var joinedPolygons = geometryEngine.union(polygons); The API then throws an error that 'd is undefined'. What am I doing wrong?
... View more
02-04-2020
02:24 PM
|
0
|
2
|
2773
|
POST
|
I have several polygons that I'd like not to overlap on the map at the points that they merge at. If I have separate latitude/longitude coordinate sets for all the polygons, how can I accomplish this? In the image below, I want the two circles filled in but not overlapping.
... View more
02-03-2020
06:08 PM
|
0
|
4
|
3264
|
POST
|
Luckily, since my "layer" is a weather radar image, I was able to use the Map Service here to accomplish what I need. nowcoast/radar_meteo_imagery_nexrad_time (MapServer)
... View more
02-03-2020
04:45 PM
|
0
|
1
|
1508
|
POST
|
I'm using the the JavaScript API v4.14. I have a stack of GraphicsLayers on my map that can be toggled on and off by the user (I'm just using map.add() and map.remove() to toggle). One layer in particular should always be positioned below the others. However, if it's toggled off and back on again, it gets positioned above the other layers. I have been able get around this by removing all the layers during the toggle and re-adding them to ensure they go in the right order. However, it seems awkward to have to this every time a user performs a toggle function as I have a lot of layers. Is there some way to ensure that this particular layer is always below the others without having to figure our which layers are being displayed and then sorting them appropriately? I've tried using the map.reorder() method without any luck.
... View more
01-30-2020
10:27 AM
|
0
|
1
|
331
|
POST
|
I am trying to overlay my basemap with a .gif image using the JavaScript web API version 4.14. I'm using the following code to initialize my MapImage and then add it to a MapImageLayer. I then add the MapImageLayer to my map. // create an add the actual image var radarImage = new MapImage({ 'extent': { 'xmin': -92.530, 'ymin': 27.361, 'xmax': -97.620, 'ymax': 31.575 }, 'href': '/data/layers/weather/high_zoom_ve_layer_weather.gif', 'spatialReference': { 'wkid': 4326 } }); weatherRadarLayer = new MapImageLayer(); weatherRadarLayer.title = "Weather Radar Layer"; weatherRadarLayer.addImage(radarImage); map.addLayer(weatherRadarLayer); My code throws the following error: Error: "scriptError: https://js.arcgis.com/4.14/esri/views/MapImage.js" q https://js.arcgis.com/4.14/:5 c https://js.arcgis.com/4.14/:23 4.14:24:471 <anonymous> https://js.arcgis.com/4.14/:24 signal https://js.arcgis.com/4.14/:6 p https://js.arcgis.com/4.14/:4 signal https://js.arcgis.com/4.14/:6 c https://js.arcgis.com/4.14/:23 What am I doing wrong and how can I overlay a .gif image on my map?
... View more
01-24-2020
03:08 PM
|
0
|
4
|
1806
|
Online Status |
Offline
|
Date Last Visited |
06-28-2022
12:32 PM
|