Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Conversation

@zugaldia
Copy link
Member

@zugaldia zugaldia commented Aug 3, 2018

This PR adds a new event to the SDK in the offline manager to help inform offline usage. Please note that it's still a WIP - not all fields are finalized, and tests are missing.

mapbox/mapbox-events-android#193 is required for this PR to land (and build).

/cc: @mapbox/maps-android

@osana osana force-pushed the az-offline-event branch 4 times, most recently from e66e0d4 to 725f37a Compare October 9, 2018 15:43
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: rename to onCreateOfflineRegion, Map is not a relevant keyword in this context. A user can also create an offline region without a map.

@osana osana force-pushed the az-offline-event branch from 725f37a to e15d6af Compare October 9, 2018 17:09
@osana osana merged commit 442e3f3 into master Oct 9, 2018
@osana osana deleted the az-offline-event branch October 9, 2018 17:40
@osana
Copy link
Contributor

osana commented Oct 9, 2018

@captainbarbosa I am wondering if there is a difference between iOS and Android in this data. For each OfflineDefinition that we track. I have:

OfflineGeometryRegionDefinition :
  private String styleURL;
  private Geometry geometry;
  private double minZoom;
  private double maxZoom;
  private float pixelRatio;

and

OfflineTilePyramidRegionDefinition:
  private String styleURL;
  private LatLngBounds bounds;
  private double minZoom;
  private double maxZoom;
  private float pixelRatio; 

Not sure what could be viewed as a source ?

@captainbarbosa
Copy link
Contributor

The source was meant to represent the list of sources that belong to a style. Both OfflineGeometryRegionDefinition and OfflineTilePyramidRegionDefinition currently don't have access to a style's sources as you would normally retrieve them from calling mapboxMap.getSources(). This limitation also exists on iOS. Its possible we can pass over the sources from mbgl so we can access them and pass them into the event.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants