Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missed tile replace not work #8

Closed
CosmaVito opened this issue Dec 27, 2017 · 2 comments
Closed

Missed tile replace not work #8

CosmaVito opened this issue Dec 27, 2017 · 2 comments

Comments

@CosmaVito
Copy link

Hi,

i have a map in my web app (an angular 2 web app).
I have installed Leaflet 1.0.1 and then the latest version of Leaflet.TileLayer.Fallback

I want to replace the missed tile with a static tile placed in a Content directory (the name of thi tile is no-tile.png).

I set bounds for my map. But i think that is not related to this.

var openstreetmapLayer = new L.tileLayer.fallback("/Content/openstreetmap/{z}/{x}/{y}.png", {errorTileUrl: '/Content/no-tile.png' });

       
 let bounds = new L.LatLngBounds(new L.LatLng(38.83328935686689, 9.9700927734375), new L.LatLng(42.31184652369512, 8.000793457031264));
        this.map = new L.Map(this.el.nativeElement, {
            center: bounds.getCenter(),
            minZoom: 8,
            maxZoom: 18,
            zoomControl:true,
            layers: [
                openstreetmapLayer
            ],
            maxBounds: bounds,
            maxBoundsViscosity: 1.0
        });


        let latlngs = L.rectangle(bounds).getLatLngs();
        L.polyline(latlngs[0].concat(latlngs[0][0])).addTo(this.map);

But i have still this error

immagine

Thanks

@ghybs
Copy link
Owner

ghybs commented Dec 27, 2017

Hi,

If you could provide a Plunker or JSBin that reproduces your issue, that would tremendously help in understanding your situation.

Feel also free to ask for help on Stack Overflow.

@ghybs
Copy link
Owner

ghybs commented Mar 30, 2018

Most probably fixed by PR #10.

Please feel free to re-open with a reproduction example if you think it is a different issue.

@ghybs ghybs closed this as completed Mar 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants