Hot answers tagged

2

The raster in question is not 8bit and has not been given a style, each requested tile is constrast stretched and reduced to 8 bits based on the data in the tile. Please configure a style for that raster that forces a fixed constrast stretch, or associates a colormap (guess you want the former, by looking at the image). See documentation here: https://docs....


2

Problem here is that Leaflet.markercluster plugin and Leaflet Control Search plugin do not know about each other, so there must be some tricks used to make them work together. First problem is that L.control.search call adds searched layers/markers to the map, which of course interferes with clustered markers. Solution to this is simply to remove layers with ...


2

You're confusing the Leaflet opacity option with a opacity WMS parameter. When instantiating a L.TileLayer.WMS, any options that are not known to Leaflet are treated as WMS parameters, as explained in the documentation: If any custom options not documented here are used, they will be sent to the WMS server as extra parameters in each request URL. This can ...


2

In your updateOpacity function you should use layer's setOpacity method: function updateOpacity(value) { wmsLayer_2.setOpacity(value); };


2

Standard projection for Leaflet is EPSG:3857. If you submit GetCapabilites request to you WMS server, you'll see that it supports only the following projections: EPSG:2056 and EPSG:21781. This means two things: If you want to use this layer, you'll have to define on of those projections with proj4leaflet plugin and then use it for your layer and your map. ...


2

There are several reasons why your map does not work: If you specify origin when defining CRS, it is lower left corner of CRS, not center. In your case that would be [208311.05, 4614890.75]. When defining CRS, you don't have to specify bounds. If you do, they must be in the form of L.bounds object, the first two coordinates must be lower left corner and the ...


2

Use the permanent option when creating a tooltip to keep the marker open. You can also use the direction:'bottom' option to position the tooltip below the marker. https://leafletjs.com/reference-1.7.1.html#tooltip-permanent .bindTooltip(`${planes[i][0]}`,{permanent:true, direction:'bottom'}).openTooltip()


2

If you look in the documentation at https://github.com/SINTEF-9012/PruneCluster, you can read that cluster .ProcessView() method "Must be called when ANY changes are made.". In your case that means that you have to call it after removal of markers: ... pruneCluster.RemoveMarkers(markers); pruneCluster.ProcessView(); ...


1

In the QGIS2Web dialog, click on the Appearance tab. A little more than halfway down click on the dropdown for Template, select Full Screen.


1

I would recommend updating your leaflet version to 1.7.1 which is the latest, and note that there are differences between leaflet 0.7 and 1+. About your popup not opening the link, it's because you set the url as text, and not as a link. You should do this to create a link: marker = new L.marker([planes[i][1],planes[i][2]]) .bindPopup(`<a href=...


1

The bounds of your request almost certainly don't align with the grid (138.2187, -33.1375) doesn't look like an even division of a lat/lon grid which I would expect to fall on numbers of degrees for a large number of zoom levels. The simple solution is that if you want tiles then you should use a tiled map service like WMTS or TMS and take the guess work out ...


1

From what i can understand, your layer is not showing when you try to add it through the layer control. Your code was almost right, you just needed to add cluster to overlayMaps instead of geo. This code should work for you. var cluster = L.markerClusterGroup(); var geo = L.geoJSON(dataview, { onEachFeature: function (feature, layer) { layer.bindPopup(...


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