Closed lectrician1 closed 4 years ago
I assume you're talking at low-zoom. Does Leaflet support what you want to do?
I assume you're talking at low-zoom. Does Leaflet support what you want to do?
I don't think so. Basically what this guy is asking is what I'd like to see: https://gis.stackexchange.com/questions/279464/leaflet-js-3d-globe-mode-with-terrain
So that would be the answer as to why it isn't done then, wouldn't it, because the software we're using doesn't support it...
Even if leaflet supported it we would of course also need our tile rendering stack to support it, and ideally the tile rendering stacks of all our tile layers... So it's probably premature to discuss it here.
Yes. This kind of feature does support move to WebGL though.
Well maybe, but that's a huge thing, and probably still needs a fallback for browsers that can't handle it.
It seems meaningless to change it for iD since iD cannot edit at low zoom level anyway?
It seems meaningless to change it for iD since iD cannot edit at low zoom level anyway?
I mean it could be, you would just have to have an algorithm that determines where you want to put nodes, even though the elevation in the editor frame is varied based on curvature of the earth (but barely). Also, having it in iD would also help improve the mapping of northern areas.
So we would need two pre-requisites for this:
Both of these are significant challenges! And neither of them are within the remit of this development team.
So while I support your feature request, until at least the first pre-requisite is solved, there's nothing that can be done here. So as such, I'm going to close this issue.
I should have posted this sooner, but now I'm more educated about how the OSM website works, concerns, etc.
CesiumJS is currently a choice: https://cesium.com/cesiumjs/
Disadvantage: It's not lightweight. However, it does support both 3d and 2d maps, so maybe switching between the two for different platforms might be an option?
Someone more experienced with tile servers should probably look into it.
I don't see how using a different library helps if the only tiles we have are mercator.
Cesium supports Merkator tiles I think (specifically from OSM, wow): https://cesium.com/docs/cesiumjs-ref-doc/OpenStreetMapImageryProvider.html
Also, if we wanted to use 3D Tiles (3D buildings yay), here's a renderer I found: https://github.com/Geodan/pg2b3dm
Reprojecting mercator tiles onto a globe on the client is hardly an optimal solution though, either in terms of complexity or of the quality of the results. Does it also require webgl to work?
Yes.
CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin. It uses WebGL for hardware-accelerated graphics, and is cross-platform, cross-browser, and tuned for dynamic-data visualization.
Right so that creates a compatibility issue as well in terms of relying on webgl. I've had to disable it on one of my machines for example to stop my browser crashing and I believe support is by no means universal.
Seems pretty well-supported to me: https://caniuse.com/webgl
Not to bring Google back into this, but they use it for both Maps and Earth. One can easily assume it's credible with the number of users they service.
Also, couldn't the website default to Leaflet?
That's the high level view but firefox at least has a whole system of blacklisting various combinations of os/graphics card/driver where there are known issues: https://wiki.mozilla.org/Blocklisting/Blocked_Graphics_Drivers
I would agree that this is a concern, but these are drivers from 10 years ago. Those who experience these issues would probably have updated them after experiencing that other commonplace sites that WebGL do not work.
I also did some research and came across this concern:
Unfortunately, hardware vendors stop producing drivers for legacy products (anything released before last Tuesday). In some cases, your PC vendor will insist on releasing their own modified driver updates and there’s no guarantee they’ll do that. Your graphics card may be WebGL-compatible, but it’ll be blocked in Firefox if the driver version is 0.0.0.1 behind the approved list.
From: https://www.sitepoint.com/firefox-enable-webgl-blacklisted-graphics-card/
This reason is also understandable. WebGL is a must-have for graphics drivers currently and this situation only seems to be a problem for older hardware.
For any of these instances, I would argue that leaving Leaflet as a defaultable map and implementing a WebGL Globe would offer much more benefits than concerns.
Reading through this I see you are suggesting using merkator tiles on a globe, the whole point of merkator is that it is flat and this wouldn't work too well.
Making a 3D globe to me would be something done with vector tiles, after those have become available.
Reading through this I see you are suggesting using merkator tiles on a globe, the whole point of merkator is that it is flat and this wouldn't work too well.
But it does work currently, which is honestly great. Also, if we were to use Leaflet as a fallback, merkator tiles would still have to be generated.
Making a 3D globe to me would be something done with vector tiles, after those have become available.
I love vector tiles too. I suggested using 3DTiles (Standard: https://www.ogc.org/standards/3DTiles Possible Renderer: https://github.com/Geodan/pg2b3dm ) for the globe as well.
I'm not sure how hard implementing 3DTiles would be though (API supports lad/long but not height, idk what osm-carto would do, you'd probably need to look more into the renderer).
@lectrician1 given that setting up a dev/demo instance of the OSM website is rather easy. I don't quite see why you haven't at least provided a proof of concept for this idea, it definitely would increase the chances of this being implemented down the road.
@lectrician1 I wasn't suggesting we stop Merkator all together, raster tiles are still the de-facto and everything supports them. Just that having vector tiles would be nice, whether raster or vector is used would depend on the style layer selected.
The benefit of vector is that the style isn't tile dependent and for a 3D globe no data is lost around the equator, with Merkator being un-projected it would be lost (low quality, the poles would also be glitchy with squashed up tiles).
3d view should be a togglable option, preferably off by default
Yes we all want vector tiles. Except that apparently nobody wants them enough to actually do the necessary work.
Here maps (Nokia?) has a globe since at least 6 years in the web browser.
And Magic Earth app (uses OSM data) is another example using a sphere – and vector tiles. The projection changes from sphere to Mercator are a bit abrupt, though.
sent from a phone
On 10 Mar 2021, at 09:27, ☠☠☠ notifications@github.com wrote:
- The only other OSM-related application that even proposed this was [OSMAnd]
Apple maps also uses a globe in 3D map view