• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

mapbox/mapbox-android-demo: Google Play demo app for the Mapbox Maps SDK for And ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

mapbox/mapbox-android-demo

开源软件地址(OpenSource Url):

https://github.com/mapbox/mapbox-android-demo

开源编程语言(OpenSource Language):

Java 92.9%

开源软件介绍(OpenSource Introduction):

Mapbox Android Demo app

CircleCI

This is a public demo of the Mapbox Maps SDK for Android. The demo app is available now in the Google Play Store and it shows off many of the examples found on:

There are also examples that only live in the app. The app's "labs" section has examples which often combine various Mapbox tools to create more complex examples.

Visit the overview page to get started using the Mapbox Maps SDK for Android in your Android project.

Steps to adding a new example

Feedback and contribution are encouraged in this repo. If you'd like to see a new example added into the app, either open an issue or create it yourself and open a pull request following these steps:

  • Create a new java file and place in the acceptable folder (examples or labs) giving it a descriptive name and ending the title with *Activity. It's important that all activities extend AppCompat.
  • If the activity needs a layout, add one with the naming convention activity_*.
  • Add the activity to the AndroidManifest.xml file.
  • Open the MainActivity.java file and scroll down to the listItems method. You'll notice a switch statement, pick one of the cases (categories) and add the new example so it matches the others.
  • Code your example and test to make sure it works properly.
  • Open a pull request with the new example.

Note: This repo uses checkstyle to make sure code contributed follows the Mapbox Style standards. When a pull request is opened, Bitrise will check that no style issues occur in the code. Read this wiki entry to set up checkstyle in Android Studio.

Running locally

Setting the Mapbox access token

This demo app uses Mapbox vector tiles, which require a Mapbox account and a Mapbox access token. Obtain a free access token on the Mapbox account page.

With the first Gradle invocation, Gradle will take the value of the MAPBOX_ACCESS_TOKEN environment variable and save it to SharedCode/src/main/res/values/developer-config.xml. If the environment variable wasn't set, you can create/edit the developer-config.xml file. Create an access_token String resource and paste your access token into it:

<string name="access_token">YOUR_MAPBOX_ACCESS_TOKEN</string>

Inside the app




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap