Comments (9)
This seems like it could be a useful feature! Could you please provide a pull request where you have implemented the change along with a demo page to show off how you would use it in practice?
👍
from leaflet-minimap.
For the demo look at this page : http://bdvllrd.o2switch.net/eurovelo3/wpdev/tests/minimap-2.html
Change the map layer to see how the minimap change.
I am a leaflet newbie so may be this is not the better implementation:
map.on('baselayerchange', function(e) {
// if needed update minimap
if (e.name != iLayer){
minimap.changeLayer(baseminimap[e.name]);
}
iLayer = e.name;
});
from leaflet-minimap.
Hello you two,
I've got a map with minimap code here: http://gis.stackexchange.com/questions/124996/minimap-in-leaflet/125111#125111
I've got some baselayers that I would like to see changing in Minimap as the baselayer changes.
But first problem is that minimap doesn't show a map at all.
Any suggestions how to fix that problem?
thanks a lot!
from leaflet-minimap.
@hoge6b01, I answered on the StackExchange post. Be a darling and accept the answer. ✔️
from leaflet-minimap.
@robpvn Thank you so much. I'll accept the answer.
What about the minimap showing the same baselayer as the real basemap?
from leaflet-minimap.
I tried Coroico's code but I am sure I did something wrong. All I got was a blank miniMap. Do you have any suggestions?
Thanks
from leaflet-minimap.
I don't have any suggestions when you don't give any details or show any code. Try making a JSFiddle with your code, remove everything that isn't related to your problem and showing us that. You might even fix the problem yourself while you do that work!
from leaflet-minimap.
Sorry, you're right. I updated the JSFiddle with my last code I tried to use. Would be great if you find any suggestion. http://jsfiddle.net/y4z9e9os/5/
from leaflet-minimap.
Your main problem was that @Coroico's code isn't in the plugin yet, so it needed to be added, secondly that you were using the other code wrong. I forked the fiddle and fixed it for you: http://jsfiddle.net/hk9f5dq0/
Now that I've taken the time to look at this properly, I might go ahead and add the relevant code into the plugin to make this easier in the future.
from leaflet-minimap.
Related Issues (20)
- Fit the zoom to map size on minimap HOT 1
- Conflict with Leaflet.contextmenu.js and L.VisualClick.js? HOT 1
- Way to display only MiniMap HOT 1
- way to move shadow rectangle HOT 1
- Minimap is empty HOT 1
- Static image on minimap but allow dragging for aimingRect and shadowRect
- .leaflet-touch style
- help
- Show minimap with image overlay HOT 1
- "worldCopyJump":true HOT 2
- autoToggleDisplay: true
- change the layers with a layergroup HOT 1
- How do I attach a click handler to the minimap?
- Position relative to a sidebar
- Request: Allow dragging aimingRect or shadowRect when both centerFixed and zoomLevelFixed are specified
- Bug: Mousewheel zooms minimap despite both centerFixed and zoomLevelFixed being specified HOT 1
- Ist this maintained anymore?
- requestAnimationFrame Forced reflow
- scroll mousewheel firefox
- Docs for React + TS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leaflet-minimap.