mapbox / mapbox-gl-native

Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
4.37k stars 1.33k forks source link

Using "mapbox://mapbox.streets-satellite" shows out of dates tiles #15975

Closed nstele closed 4 years ago

nstele commented 4 years ago

I was comparing Android and web that we are developing with Mapbox and I've notice that the Android tiles don't show the correct images for the zoom level. In fact the tiles are out of date. I'm using "mapbox://mapbox.streets-satellite" url to get the sources.

Android app:

ezgif com-video-to-gif (4)

Steps to reproduce

  1. Load a map using mapbox://mapbox.streets-satellite as satellite sources
  2. Play with zoom in some areas of the maps
  3. Tiles looks like out of date

I've also changed the url for "mapbox://mapbox.satellite" and the tiles looks ok, but I need to use the one which shows the streets names.

Configuration

Android versions: All versions Device models: Mapbox SDK versions: mapboxServicesVersion = '4.8.0' mapboxVersion = '8.2.0'

tobrun commented 4 years ago

@nstele what happens if you delete the app and reinstall it? Do you see the correct tiles after? These questions will allow us to determine if it's an issue with the cache or the actual style.

nstele commented 4 years ago

@tobrun I was able to reproduce it after reinstalled the app.

nstele commented 4 years ago

@tobrun any news about this??

tobrun commented 4 years ago

You mention using mapbox://mapbox.streets-satellite. current version is actually:

  public static final String SATELLITE_STREETS = "mapbox://styles/mapbox/satellite-streets-v11";

This will be the issue. Let us know if not.

nstele commented 4 years ago

@tobrun this URL not solved the problem. I'm using the URL to get the sources.

class MapboxSatelliteLayer: Layer() {
  override val identifier = BaseLayerType.MAPBOX_SATELLITE.key
  override val name = BaseLayerType.MAPBOX_SATELLITE.layerName

  override fun getSources() = mapOf(
      Pair(identifier, mapOf(
          Pair(TYPE_KEY, LAYER_RASTER_TYPE),
          Pair(URL_KEY, URL),
          Pair(TILE_SIZE_KEY, TILE_SIZE)
      ))
  )

  companion object {
    private const val URL = "mapbox://mapbox.streets-satellite"
  }
}
nstele commented 4 years ago

@tobrun any news about this?

AliKhoshraftar commented 4 years ago

I had same problem and fixed with add fresh=true as url parameter : mapbox://mapbox.streets-satellite?fresh=true

hope to fix this.

nstele commented 4 years ago

@AliKhoshraftar Thanks, but in this case it didn't work.

chloekraw commented 4 years ago

I think this may be an issue on the mapbox://mapbox.streets-satellite side.

cc @mapbox/imagery -- user is reporting that satellite imagery on mapbox://mapbox.streets-satellite does not match imagery on mapbox://mapbox.satellite. Have we kept the former updated?

riastrad commented 4 years ago

@nstele, the reason you are seeing outdated imagery is because mapbox://mapbox.streets-satellite is actually a legacy classic style and not the same thing as the mapbox://mapbox.satellite raster tileset.

I would strongly advise migrating off of mapbox.streets-satellite since Mapbox is slated to deprecate Classic Styles this year (source), and instead initialize your map using the mapbox://styles/mapbox/satellite-streets-v11 style which combines the (frequently updated) mapbox.satellite raster tileset with additional GL styling.

chloekraw commented 4 years ago

Thank you @riastrad, closing this ticket!

nstele commented 4 years ago

@tobrun I'm getting this error : Failed to load source street_layer: HTTP status code 404 when I change the URL from "mapbox://mapbox.streets-satellite" to "mapbox://styles/mapbox/satellite-streets-v11"

W/DefaultFileSour: type=1400 audit(0.0:2828558): avc: granted { create } for name="mbgl-offline.db-journal" scontext=u:r:untrusted_app:s0:c150,c258,c512,c768 tcontext=u:object_r:sdcardfs:s0:c150,c258,c512,c768 tclass=file E/Mbgl: {android.staging}[Style]: Failed to load source street_layer: HTTP status code 404

monolithgoon commented 4 years ago

@tobrun I'm getting this error : Failed to load source street_layer: HTTP status code 404 when I change the URL from "mapbox://mapbox.streets-satellite" to "mapbox://styles/mapbox/satellite-streets-v11"

I'm getting the same problem as well, but for a web app I'm building.