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

Problem displaying basemap with MiniMap plugin #37

Open
geoiva opened this issue May 27, 2021 · 2 comments
Open

Problem displaying basemap with MiniMap plugin #37

geoiva opened this issue May 27, 2021 · 2 comments

Comments

@geoiva
Copy link

geoiva commented May 27, 2021

Good afternoon,

Thank you for the nice work!
I am having a problem adding the MiniMap plugin control (https://github.com/Norkart/Leaflet-MiniMap). I followed the pattern in the code, and I have been able to add the MiniMap but I cannot see the basemap from the MiniMap. I get the following error: "There was a problem running the BeforeMapLoads custom code: Cannot read property 'on' of undefined". I added the control in the setBasemap Function:

function setBasemap(basemap){
    ......
    bootleaf.MiniMapControl = new L.Control.MiniMap(bootleaf.basemapLayer).addTo(bootleaf.map);
}

Any help on how can I do it? Thank you in advance.

Is there any guide or something I could follow?

image

@slead
Copy link
Contributor

slead commented May 27, 2021

I haven't tried the minimap, but it looks cool. Are you able to share a link to your code (live site, or GitHub) so I can take a look? thanks

@geoiva
Copy link
Author

geoiva commented May 28, 2021

Thank you for the quick reply.

You can see the code here: http://geoibol.com/bootleaf-iag-geo/

I tried two approaches:
a) Line No 567 (app.js file). In the "Add map controls:" section, but basemap is not defined yer.

b) Line Nro 819 (app.js file), where the setBasemap function is...

Regards,

Ivar

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