waynegm / imgViewer2

Extensible and responsive jQuery plugin to zoom and pan images based on the Leaflet mapping library
MIT License
60 stars 34 forks source link

Issue with Large Image #13

Closed RajnikPatel closed 6 years ago

RajnikPatel commented 6 years ago

I face issue when image is large. Note : I face issue only in iPad and iPhone only. Resolution : 4320 x 7680 Size : 2.15 MB When image is load in plugin half image display proper and half image display gray. When I remove .imgViewer2() image fully load problem is only with imgViewer2 plugin.

img_0774

Please give me a solution.

waynegm commented 6 years ago

This maybe related to this Leaflet issue 5895. They suggest disabling 3D acceleration (set global switch L_DISABLE_3D to true before loading Leaflet) as a work around:

<script>L_DISABLE_3D = true;</script>
<script` src="leaflet.js"></script>

I can't test this as I don't have access to an iPad/iPhone and the Google Chrome emulator for iPad/iPhone doesn't show this problem. Can you try this and let me know the outcome.

RajnikPatel commented 6 years ago

No. It's still not work

waynegm commented 6 years ago

You could try different versions of Leaflet to see if that makes a difference. Other than that it may be an iOS limitation for which I can't offer any help or workaround. Would it be worth giving my imgViewer plugin a try which doesn't use Leaflet?

RajnikPatel commented 6 years ago

For this your solution. how I can remove gray color background of image ? In this solution image will loaded full but background behavior not good.

and minus button also stopped work!

<script>L_DISABLE_3D = true;</script>
<script` src="leaflet.js"></script>
waynegm commented 6 years ago

Use CSS to change the background color. Include the following (change the ddd to the hex color you want) into your site CSS and load it after leaflet.css

.leaflet-container {
    background: #ddd;
}

Is the minus button issue just with iPhone/iPad also?

RajnikPatel commented 6 years ago

No, minus button issue for all devices

waynegm commented 6 years ago

Can you provide a url demonstrating the issue so I can have a look at the code in a debugger?