Skip to main content
naming
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65

Overlay image in mapboxMapbox gl doesn't work in Chrome

I'm trying to prepare image overlay layer in mapbox gl with city plan as background. It works perfect in FirfoxFirefox but in Chrome I see only dark grey polygon. I use 4Mb .png file.

Firefox Desktop - ok

Firefox Mobile- not ok

Chrome Deskotop -not ok

Firefox Mobile -not ok enter image description here

       map.addLayer({
                "id": "overlay",
                "source": {
                    "type": "image",
                    "url": "7.png",
                    "coordinates": [
                        [30.0112567, 51.4361221],
                        [30.187844, 51.4361221],
                        [30.187844, 51.3696605],
                        [30.0112567, 51.3696605]
                    ]
                },
                "type": "raster",
                "paint": {
                    "raster-opacity": 0.85
                }
            });

Overlay image in mapbox gl doesn't work in Chrome

I'm trying to prepare image overlay layer in mapbox gl with city plan as background. It works perfect in Firfox but in Chrome I see only dark grey polygon. I use 4Mb .png file.

Firefox Desktop - ok

Firefox Mobile- not ok

Chrome Deskotop -not ok

Firefox Mobile -not ok enter image description here

       map.addLayer({
                "id": "overlay",
                "source": {
                    "type": "image",
                    "url": "7.png",
                    "coordinates": [
                        [30.0112567, 51.4361221],
                        [30.187844, 51.4361221],
                        [30.187844, 51.3696605],
                        [30.0112567, 51.3696605]
                    ]
                },
                "type": "raster",
                "paint": {
                    "raster-opacity": 0.85
                }
            });

Overlay image in Mapbox gl doesn't work in Chrome

I'm trying to prepare image overlay layer in mapbox gl with city plan as background. It works perfect in Firefox but in Chrome I see only dark grey polygon. I use 4Mb .png file.

Firefox Desktop - ok

Firefox Mobile- not ok

Chrome Deskotop -not ok

Firefox Mobile -not ok enter image description here

       map.addLayer({
                "id": "overlay",
                "source": {
                    "type": "image",
                    "url": "7.png",
                    "coordinates": [
                        [30.0112567, 51.4361221],
                        [30.187844, 51.4361221],
                        [30.187844, 51.3696605],
                        [30.0112567, 51.3696605]
                    ]
                },
                "type": "raster",
                "paint": {
                    "raster-opacity": 0.85
                }
            });
Source Link
pawaelus
  • 351
  • 1
  • 5
  • 14

Overlay image in mapbox gl doesn't work in Chrome

I'm trying to prepare image overlay layer in mapbox gl with city plan as background. It works perfect in Firfox but in Chrome I see only dark grey polygon. I use 4Mb .png file.

Firefox Desktop - ok

Firefox Mobile- not ok

Chrome Deskotop -not ok

Firefox Mobile -not ok enter image description here

       map.addLayer({
                "id": "overlay",
                "source": {
                    "type": "image",
                    "url": "7.png",
                    "coordinates": [
                        [30.0112567, 51.4361221],
                        [30.187844, 51.4361221],
                        [30.187844, 51.3696605],
                        [30.0112567, 51.3696605]
                    ]
                },
                "type": "raster",
                "paint": {
                    "raster-opacity": 0.85
                }
            });