Skip to content

Latest commit

 

History

History

extension-localization

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Mapbox Maps Localization Extension for Android

Overview

The Mapbox Localization Extension for Android is a public library for localizing labels for a MapView. This extension library can localize supported languages in mapbox-streets-v8 and mapbox-streets-v7

A full overview of classes and interfaces can be found in our API documentation.

Getting Started

This README is intended for developers who are interested in contributing to the Mapbox Localization Extension for Android. Please visit DEVELOPING.md for general information and instructions on how to use the Mapbox Maps Extension System. To add the Localization Extension to your project, you configure its dependency in your build.gradle files.

// In the root build.gradle file
// The Mapbox access token needs to a scope set to DOWNLOADS:READ
allprojects {
    repositories {
        maven {
            url 'https://api.mapbox.com/downloads/v2/releases/maven'
            authentication {
                basic(BasicAuthentication)
            }
            credentials {
                username = "mapbox"
                password = "INSERT_MAPBOX_ACCESS_TOKEN_HERE"
            }
        }
    }
}

// In the app build.gradle file
dependencies {
  implementation 'com.mapbox.extension:maps-localization:11.6.0-rc.1'
}

Example

Customizing Mapbox Localization Extension for Android could be done in two ways: by either providing your own version of the Localization Extension or by using the existing Localization Extension API. The former is documented in DEVELOPING.md, the latter can be achieved with:

mapboxMap.loadStyleUri(styleUri) {
    it.localizeLabels(selectedLocale)
}

More concrete examples of the Localization Extension can be found in our test application.

Dependencies

View LICENSE.md for all dependencies used by this extension.