0

I want to create a style in mapbox studio. Lets say specifying blur effect, zoom etc. I can export this style as a link or as a .json file. And I want to use the style properties in android code for a specific CircleLayer.

I know I can set properties in java code one by one for a layer. But I want to apply entire style that was created in mapbox studio and which is represented in json format.

Mapbox studio where I create set of style properties.

enter image description here

And a piece of code with CircleLayer

enter image description here

Andrew
  • 2,438
  • 1
  • 22
  • 35
  • 1
    `I can export this style as a link or as a .json file` afterwards you load this definition inside your map with MapboxMap#setStyleUrl("someUrl") – Tobrun Jan 16 '18 at 09:28
  • I already use satellite style. Do you mean that by setStyleUrl() I'm actually adding new style on top of the previous style? And I'm looking for a way to apply simple style to 1 layer, not to entire map. – Andrew Jan 16 '18 at 09:39
  • 1
    You have a misconception how styles work. Style is the parent that has the layers and sources. You can go online to Mapbox Studio and create a new style based on the sattellite streets style and add layers/sources to it. Use that style url to load your map. – Tobrun Jan 16 '18 at 12:59

1 Answers1

0

As Tobrun pointed out, I had misconception about styles. What I wanted to do is to make blur effect on CicleLayer. And I did it by applying "circleBlur" propety to my layer.

circleBlur(Function.zoom(Stops.exponential(
                        Stop.stop(16, circleBlur(0.8f)),
                        Stop.stop(17.9, circleBlur(1.2f)),
                        Stop.stop(CLICKABLE_TREE_ZOOM_LEVEL, circleBlur(0f))
                ).withBase(1f))
Andrew
  • 2,438
  • 1
  • 22
  • 35