IvanSanchez / Leaflet.ImageOverlay.Rotated

Displays rotated/slanted image overlays in Leaflet
94 stars 24 forks source link

function setUrl from L.ImageOverlay does not work #1

Closed hmesa closed 7 years ago

hmesa commented 7 years ago

Hi, I tried to change the url from an ImageOverlay.Rotated myOverlay.setUrl(newUrl) but it did not work. Maybe extending the function setUrl to setUrl:function(url){ this._super(url); this._rawImage.src=url; } could be enough. A very good and useful job, by the way. Thank you very much Best regards

IvanSanchez commented 7 years ago

2 should fix this. Can you please test that out?

hmesa commented 7 years ago

Everything seems to work fine now, thanks

oubaguilai commented 7 years ago

@hmesa Hi , I tried to change the url from an ImageOverlay myOverlay.setUrl(newUrl) but it did not work ,can you tell me how to resolve?

thanh-taro commented 7 years ago

It seems to be missing setUrl in the newest release.

hmesa commented 7 years ago

Hi, try adding the following code to the L.ImageOverlay.Rotated class setUrl : function(url) { this._url = url; if (this._rawImage) { this._rawImage.src = url; } return this; }

thanh-taro commented 7 years ago

Yeah. It’s a workaround solution. But it’ll be better if the owner add it back to source code.

hmesa commented 7 years ago

The author made the change but i thing he did it on a branch. He only needs to merge it to master when he will have time. Bests

thanh-taro commented 7 years ago

Yeah. I saw the pull request. 10 months ago. :(

IvanSanchez commented 7 years ago

OK, OK, you got it. Merged, version bumped, and published into npm.

thanh-taro commented 7 years ago

Great! Thank you. :D