5

You should add a condition to if statement whether the layer exists. If you don't do this, you will add one more layer for each 'zoomend'. Use this way: const npsBoundaries = L.esri.featureLayer({ url: 'https://services1.arcgis.com/fBc8EJBxQRMcHlei/ArcGIS/rest/services/National_Park_Service_Boundaries/FeatureServer/0', style: function (feature) { ...


2

selectedSubdist is a Feature, style() is a function on FeatureCollection. Wrap it in a FeatureCollection wrapper. ee.FeatureCollection([selectedSubdist]).style({styleProperty: "style"})


2

I think I have this fixed now. It seems that I had the right idea of how to calculate the resolutions, but I made a blunder in the execution. I was calculating the “first” resolution for the fully zoomed in (full-sized) image correctly. But of course the fully zoomed-in resolution should actually be the LAST resolution, not the first. Then the subsequent (...


2

Sentinel 2 data is distributed as granules (tiles) that are 100x100 km2 ortho-images in UTM/WGS84 projection (source). Because the satellite path is not aligned with axes of the UTM projections, the tiles along the satellite path edge appear as triangles or trapezoids. The following script visualizes the boundaries of the S-2 granules imaged on a single day. ...


1

var image = ee.Image(filtered.first()); In this line you are asking for only one image from the collection that matches your filters. To get coverage of the entire area, you must consult multiple images. A common way to do this is with the .mosaic() operation, which layers the images “on top of” each other (last on top, so most recent on top if not sorted). ...


1

If you want do display coordinates of the clicked point, you can use layer popupopen event processing function to get hold of clicked coordinate and set popup content accordingly. Code could the look something like this: let testing = L.geoJson(riverdata, { style: lineStyle, onEachFeature: function (feature,layer) { layer.bindPopup(''); layer.on(...


1

It is impossible because yearly images in Image Collections that you made did not preserve original scale of Landsat images (they have 111,319.49 m, 1.0 arc degree, instead of 30 m as you expected). So, expected 0.5 ha is not about 6 pixels. In these images, as Forest0, one pixel is corresponding to 1,239,202.88 ha; not 0.09 ha. On the other hand, all ...


1

I noticed a few things. (1) To clip over an ImageCollection, you need to use the map function; (2) your function was written incorrectly. I reproduced your code using an arbitrary geometry. Hope this helps! // Load the region of interest var geometry = /* color: #98ff00 */ee.Geometry.Polygon( [[[102.7313828161343, 15.766103402947243], [102....


1

If you just need to add id to each path elements, you can be able to achieve that by simply using a jquery script. ## OPTION 1 : use jQuery once polygons are loaded This will do the job. Be Sure to match the right id container, here map : $(function() { var id = 0; $( "#map path" ).each(function( index ) { $( this ).prop('id', id); ...


1

I've got similar problem. When I drag map and then drop it - imageOverlay starts loading only when I add it to map. I ended up with such code (I force loading image before adding it to map): let imageLayer = L.imageOverlay(imageUrl, imageBounds) imageLayer._initImage() imageLayer.once('load', () => { that.map.eachLayer(function (...


Only top voted, non community-wiki answers of a minimum length are eligible