Open jywarren opened 5 years ago
@jywarren , I will need to study LDI API for this . If you can provide following details, it would be great help!
map.whenReady(function () {
// By default, 'img' will be placed centered on the map view specified above
img = L.distortableImageOverlay('example.png').addTo(map);
});
Does this function will help? If yes, then the image URL is in the mapknitter API (https://mapknitter.org/map/region/Gulf-Coast.json?minlon=-98.8&minlat=23.6&maxlon=-79.1&maxlat=31.8) ? Also what about the position of the image, do we have to mention it?
Ah so, for each map, we have to make an additional call to find the corner locations of each image. The call is:
https://mapknitter.org/maps/MAPNAME/warpables.json
so for example, https://mapknitter.org/maps/pvdtest/warpables.json -- this shows the URL of each image and the corner positions. These can be used to construct the LDI object. Then we can just delete it when you zoom out again. How does that sound?
On Sat, Aug 24, 2019 at 7:32 AM Sagarpreet Chadha notifications@github.com wrote:
@jywarren https://github.com/jywarren , I will need to study LDI API for this . If you can provide following details, it would be great help!
- So at zoom level lets say 15, we will replace marker with LDI image if it exists,right?
map.whenReady(function () { // By default, 'img' will be placed centered on the map view specified above img = L.distortableImageOverlay('example.png').addTo(map); });
Does this function will help? If yes, then the image URL is in the mapknitter API ( https://mapknitter.org/map/region/Gulf-Coast.json?minlon=-98.8&minlat=23.6&maxlon=-79.1&maxlat=31.8) ? Also what about the position of the image, do we have to mention it?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/leaflet-environmental-layers/issues/153?email_source=notifications&email_token=AAAF6J2GU5EV2JDELDLLL7TQGELZHA5CNFSM4HA4CV52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5B6I4Y#issuecomment-524543091, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAF6J6ZQAHBCUVLMUCEFZ3QGELZHANCNFSM4HA4CV5Q .
Is there any help that is wanted on this issue if so I can be of assistance.
Hi, that would be great -- we're trying to get it so that when zooming in far enough, you see something like this:
Instead of like this:
This will be based on https://github.com/publiclab/Leaflet.DistortableImage/
The code for this layer is at: https://github.com/publiclab/leaflet-environmental-layers/blob/master/src/mapKnitterLayer.js
Any help appreciated!