Open davenquinn opened 9 years ago
Yeah, I've been planning to do this for about two years. It would definitely be Leaflet, OpenLayers drove me crazy once already (I think it is an overengineered mess). The problem is that the tile display of the frontend cose is just a tiny portion of WMA. There is the 3D rendering (WebGL with Canvas fallback), the size comparison (which allows you to drag arbitrary polygons over the map), the label streaming which progressively loads the labels for each tile (and not a bunch of marker pins all at once), the client-side rendering (using canvas) for the high zoom levels (with clickable OSM paths), the thumbnail preview for commons, the multilingual user interface, the blue "other coordinates on this page" pins (that work without server communication), etc. etc. Then there is the backend code. Everything is currently setup to use plate carree projection (which I like, but I guess the masses are conditioned to like Web Mercator nowadays, even if it looks shit for low zooms and is more geared toward high zoom levels, where you get correct angles and don't notice the ridiculous area distortion). I would like to point out that I have not reinvented much here! WMA started about nine years ago and I was having client-side tile and 3d building in "production" before most other projects (ha, one reason might be that my standards of what to consider "ready" are just lower :-) ). Anyhow, if you are serious about this and not put of by this post I would be very excited to get help on this. With another developer willing to commit time on this we could tackle a Leaflet port. Do you have WMF Labs account?
Ok, I just looked at Leaflet and I'm getting more and more excited about this. The custom map projection support is a huge deal! With that we could build a proof of concept version of WMA with the existing tile rendering and label server system.
OK, I think this kind of collaboration would be great. I've amassed quite a bit of experience with Leaflet recently; I just spent a few weeks getting it working for one of my projects. I'm working with Mars imagery, so everything needs to be in some exotic projection or another. Everything's now displayed in transverse mercator, which is awesome and quite a step up from my previous web-maps hackery.
As you alluded to, I think Leaflet is flexible enough to essentially substitute it as a backend and just interface your Canvas/WebGL components with the new mapping code, for starters. Any improvements in basic architecture should become obvious from there.
As an aside, I guess the one major advantage to Web Mercator is a greater compatibility with outside tilesets. But an advantage of making this move to Leaflet is that we can (hopefully) abstract much of this away, and make those decisions at a higher level.
I'm excited to get involved in this, and I just made a WMF Labs account.
Just an idea that I have (and would be happy to fork and work on if it seems like a good path): do you think it would be useful/desirable to farm out some of the basic mapping functionality of this plugin with a Leaflet dependency? With their 0.8 update, they have full support for different CRS parameters and other planetary bodies, which brings them in line with one of the major use cases for WikiMiniAtlas. Another alternative would be OpenLayers 3, which is heavier but has more built-in support for 3D views, etc. Depending on a dedicated mapping library would free this project to focus on more specialized functionality/language support/etc.
It just seems like as things evolve, more and more time will be spent reinventing the wheel to keep up. Standardizing the internal architecture would also help others with web GIS experience contribute more constructively.