Files
MapLibreParticleLab/platform/android
Anand Thakker f901e776b3 [core] Implement data-driven styling for {text,icon}-{color,opacity,halo-color,halo-blur,halo-width} (#7939)
* Add symbol dds attributes and adapt style code generation

* Update to mapbox-gl-js/master

* Refactor SymbolFeature as a subclass of GeometryTileFeature

Prepares for enabling DDS on symbol paint properties by allowing the
SymbolFeatures, which we keep around after constructing SymbolLayout,
to be used in evaluating data-driven paint properties later in the
layout process.

* Draft approach for splitting icon/text paint properties

The `Program` types are set up to bind GL attributes to each of the
data-driven paint properties specified in the `PaintProperties` type
provided.  Since `SymbolPaintProperties` specifies both `Text*` and
`Icon*` properties, the symbolIcon, symbolIconSDF, and symbolGlyph
programs each attempt to bind roughly double the number of attributes
that they actually need.

This change addresses this by:
- Adding the more specific `IconPaintProperties` and `TextPaintProperties` types, which are subsets of the full `SymbolPaintProperties`.
- The symbol layer continues to use its `SymbolPaintProperties paint` member to track layer property state, but it provides helpers that construct objects of each the specific `{Icon,Text}PaintProperties::Evaluated` type, for use by the painter.
- The three symbol programs instantiate `Program<>` using the appropriate `{Icon,Text}PaintProperties` type.

* check in generated style code

* Populate paint buffers for symbol DDS properties

* Address first round of review comments

* Refactor VectorTile{Layer,Feature} to explicitly share data

* Update submodule
2017-02-28 19:54:24 -08:00
..
2017-02-28 09:33:04 -08:00

Mapbox Android SDK

Bitrise

A library based on Mapbox GL Native for embedding interactive map views with scalable, customizable vector maps into Java applications on Android devices.

To install and use the Mapbox Android SDK in an application, see the Mapbox Android SDK website.

Contributing to the SDK

These instructions are for developers interested in making code-level contributions to the SDK itself. If you instead want to use the SDK in your app, see above.

Building the SDK yourself requires a number of dependencies and steps that are unnecessary for developing production applications.

Setting up the Android emulator

The Mapbox Android SDK requires Android 4.0.3+ (API level 15+).

If you want to run the test app in the emulator, we recommend the x86 build because it will run a lot faster.

First ensure you have an MAPBOX_ACCESS_TOKEN environment variable set, as described below. Then, create an x86 build:

make android-lib-x86

In Android Studio, create an x86 AVD (Android Virtual Device):

  • Open AVD Manager via the Tools menu -> Android -> AVD Manager
  • Click "Create Virtual Device" at the bottom on AVD Manager window
  • Select one of the device profiles, for example the Nexus 4
  • Click "Next"
  • Select a Lollipop or Kitkat release with ABI of x86. If the line is greyed out click Download to download the OS files.
  • Click "Next"
  • Under "Emulated Performance" check "Host GPU" and uncheck "Store a snapshot for faster startup"
  • Click "Finish"
  • Close the AVD Manager

Now when you run or debug the Android project you will see a window "Choose Device". Select your new AVD from drop down under "Launch emulator". If you select "Use same device for future launches" Android Studio will remember the selection and not ask again.

Running Mapbox GL Native on a hardware Android device

The Mapbox Android SDK requires Android 4.0.3+ (API level 15+).

First read the Google documentation to set up your device and your OS to connect to the device.

When you plug your device in and then run or debug the Android project you will see a window "Choose Device". Choose your device from the "Choose a running device" list.

If your device does not show up, double check the Google documentation.