melowntech / vts-browser-js

JavaScript WebGL 3D map rendering engine
BSD 2-Clause "Simplified" License
218 stars 42 forks source link

map zoom level lock #150

Closed OlegYarko closed 5 years ago

OlegYarko commented 5 years ago

Hello ) ! I'm trying to make a smooth zoom in but at low altitude there is a visual differences between foreground and background. https://imgur.com/a/GSfATr2

Can you advise something? Perhaps there is a method to use the same zoom level for all tiles. Of course, this will increase the load time, but for my purposes it ok.

davidmtech commented 5 years ago

Hello,

we do not have data source which cover all zoom levels. So it switch between different data sources. These data source can have different colors because of different seasons, cameras, .. etc. You can remove Bing data source from the map, but map will be blurry at low altitude. You can do it following way:

//get current map view 
var view = map.getView();

It will return something like this:

{
  "surfaces": {
    "melown-viewfinder-world": [
      "bmng08-world",
      "bing-world"
    ],
    "melown-viewfinder-1-arc-sec": [
      "bmng08-world",
      "bing-world"
    ]
  },
  "freeLayers": {}
}

Remove bing-world from the surfaces and set new view to the map:

view = {
  "surfaces": {
    "melown-viewfinder-world": [
      "bmng08-world"
    ],
    "melown-viewfinder-1-arc-sec": [
      "bmng08-world"
    ]
  },
  "freeLayers": {}
}

map.setView(view);