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

MapboxMap should have methods to list layers and sources #7285

Closed
1ec5 opened this issue Dec 4, 2016 · 2 comments
Closed

MapboxMap should have methods to list layers and sources #7285

1ec5 opened this issue Dec 4, 2016 · 2 comments
Labels
Android Mapbox Maps SDK for Android GL JS parity For feature parity with Mapbox GL JS navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general runtime styling

Comments

@1ec5
Copy link
Contributor

1ec5 commented Dec 4, 2016

MapboxMap should have the following methods, which are possible now that #6097 has landed in master:

  • List<Layer> getLayers()
  • void addLayerAfter(Layer, String) (not sure about the naming, but adding a layer above a particular layer is more commonplace than adding one below it)
  • void addLayer(int, Layer)
  • Layer removeLayer(int)
  • List<Source> getSources()

Additionally, removeLayer(Layer) and removeLayer(String) should return Layer.

These methods will all be present in iOS SDK v3.4.0 and macOS SDK v0.3.0. Labeling as GL JS parity because these operations are also possible in GL JS using getStyle() and setStyle().

/cc @ivovandongen

@1ec5 1ec5 added Android Mapbox Maps SDK for Android GL JS parity For feature parity with Mapbox GL JS runtime styling labels Dec 4, 2016
@tobrun tobrun added this to the android-v5.0.0 milestone Dec 21, 2016
@tobrun
Copy link
Member

tobrun commented Dec 21, 2016

Capturing from talks with @ivovandongen that we should hold on implementing this until #6533 lands else this would result in doing the work twice.

@deinlandel
Copy link

deinlandel commented Jan 18, 2017

Voting on this. Currently I'm trying to change map locale.

I'm trying to do this according to https://www.mapbox.com/help/change-language/
But "city_label_big" layer always returns null.
As well as layers

country_label
marine_label
state_label
place_label
water_label
waterway_label
motorway_junction
airport_label
rail_station_label
mountain_peak_label
road_label
poi_label

I tried every possible layer name I encountered in various mapbox default styles, and it always return null. Without the ability to list layers I can't even understand what's wrong with my layer names.

@1ec5 1ec5 added the navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general label Jan 31, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android GL JS parity For feature parity with Mapbox GL JS navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general runtime styling
Projects
None yet
Development

No branches or pull requests

3 participants