forked from publiclab/Leaflet.DistortableImage
-
Notifications
You must be signed in to change notification settings - Fork 0
awikile_h
Bankn8II©$A edited this page Dec 7, 2024
·
9 revisions
https://github.com/aibolem/Leaflet.DistortableImage/wiki/
This wiki is still growing, feel free to participate!
Existing pages so far:
- awikile_h Adding a Custom Action to the Toolbar
- awikile_h Additional Components
- awikile_h singleclick event
- awikile_h SVG Icon System
- awikile_h Testing
- awikile_h Toolbar Actions and Keybindings
var imageBounds=[
https://www.wrld3d.com/wrld.js/v0.1.1335/docs/leaflet/L.ImageOverlay/
var imageUrl = 'http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg',
imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];
L.imageOverlay(imageUrl, imageBounds).addTo(map);
useEffect(() => {
if (map && layer) {
layer.addTo(map);
layer.setOpacity(0.7);
}
}, [layer]);
https://github.com/publiclab/Leaflet.DistortableImage/issues/1391
function imageStyle(){
return{ opacity:0.5,}
}
var imageBounds=[
[-22.0,22.5],
[-26.18,25.452]
]
var imageLayer=L.imageOverlay(imageUrl,imageBounds).addTo(map);
//imageLayer.setOpacity( 0.5);
OR: https://stackoverflow.com/questions/61954320/how-to-modify-the-opacity-from-an-image-in-my-leaflet-code
L.imageOverlay(imageUrl, imageBounds, {opacity: 0.5}).addTo(map);
not any code was usefull untill now 20241205 20:47, about default img layer opacity, but like always we will do something ...
var imageOverlay = L.imageOverlay(this.imageUrl, this.projectBoundary.getBounds(), {
opacity: 0.8,
interactive: true
}).addTo(this.map);
var draggableOverlay = new L.Draggable(imageOverlay._image);
draggableOverlay.enable();
_toggleTransparency: function() {
var image = this._overlay._image,
opacity;
this._transparent = !this._transparent;
opacity = this._transparent ? this.options.opacity : 1;
L.DomUtil.setOpacity(image, opacity);
image.setAttribute("opacity", opacity);
},
ToggleTransparency = EditOverlayAction.extend({
options: {
toolbarIcon: {
html: '<i class="material-icons md-18">opacity</i>',
tooltip: 'Toggle Transparency'
}
},
addHooks: function() {
var editing = this._overlay.editing;
editing._toggleTransparency();
this.disable();
}
}),
https://github.com/Esri/esri-leaflet/issues/747
https://github.com/nwfsc-fram/warehouse/blob/master/server/app/view2/view2.js#L562
And we have a bunch of layers : https://www.nwfsc.noaa.gov/data/map

https://aibolem.github.io/Leaflet.DistortableImage/examples/parisel.html

Latitude: 48.856301 Longitude: 2.321205
