Questions tagged [mapbox-android]

Mapbox Android Services contains directions, geocoding, and many more APIs to use inside your Android or Java application

Available specific SDK Docs and Tags:

Maps SDK for Android -> mapbox-android-maps

Navigation SDK for Android -> mapbox-android-nav

Vision SDK for Android -> mapbox-android-vision

570 questions
11
votes
1 answer

Listen for click events on a LineLayer

Various lines are added to the map representing routes using the following code: private LineLayer makeLineLayer(List routePoints, String title) { String sourceTitle = "line-layer-" + lineCount; List points = new…
Orbit
  • 2,985
  • 9
  • 49
  • 106
10
votes
2 answers

How to use Mapbox PlacePicker activity in Application with no Actionbar?

I am investigating the excellent Mapbox library within my current Android Application. I have come across this issue when trying to integrate the PlacePickerActivity. Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void…
Hector
  • 4,016
  • 21
  • 112
  • 211
8
votes
5 answers

How to get current location in MAPBOX in android

As I am using MAPBOX in my application. I don't know how to get current lat and long. I used this way to get the current location.But its showing null object reference.Please help me to solve my problem mapView =…
kalai vani
  • 289
  • 2
  • 4
  • 21
7
votes
10 answers

How to solve : Failed to resolve: com.mapbox.mapboxsdk:mapbox-android-sdk:9.5.0

I face this problem when trying to use mapbox in Android studio Failed to resolve: com.mapbox.mapboxsdk:mapbox-android-sdk:9.5.0 what is the problem? my build.gradle dependencies dependencies { implementation fileTree(dir: "libs", include:…
roro roor
  • 137
  • 1
  • 4
  • 8
7
votes
1 answer

Adding and displaying data from a locally stored GeoJSON file using MapBox

I'm attempting to add markers to a map from a GeoJSON File that has been added to the "asset" folder. I've attempted to follow the documentation however have been unable to get the expected result since the markers are no where to be found when…
Enigmatic
  • 3,902
  • 6
  • 26
  • 48
7
votes
2 answers

Get coordinates of geogson feature in Mapbox

A GeoJson feature looks like this : { "type": "Feature", "properties": {}, "geometry": { "type": "Point", "coordinates": [ 43.59375, 59.17592824927136 ] } } In Mapbox using Java/JVM we can construct the feature like…
erluxman
  • 18,155
  • 20
  • 92
  • 126
7
votes
1 answer

Custom OSRM server Mapbox Navigation SDK

Is it possible using custom OSRM server (Docker) for routing in navigation SDK? If i have custom streets in postgrey db, how can i calculate route on this streets? Something as NavigationRoute.builder(this) .baseUrl("my server…
6
votes
2 answers

Display 3D Terrain Mapbox v10 Android

I am trying to use the new mapbox for android v10 with specifically the new 3d terrain feature. All the examples are in Kotlin, I have followed the online guide below but I keep running into the same error message. Online…
Reafidy
  • 8,240
  • 5
  • 51
  • 83
6
votes
0 answers

How to get all features from geoJson source Mapbox

I have loaded a geoJson source into my mapView. I have a search bar in my activity. So my plan is that I want to populate my searchBar suggestions with feature types from the geoJson source added to my map. I would like to do this from…
bensofter
  • 760
  • 1
  • 14
  • 27
5
votes
2 answers

Android Mapbox SDK v10: attribution position; UiSettings

How is possible to adjust the logo and attribution in com.mapbox.mapboxsdk.maps.MapView? In the older SDK v9, it was possible to simply set UiSettings via XML attributes (or by changing UiSettings…
Francis
  • 6,788
  • 5
  • 47
  • 64
5
votes
3 answers

Rotate marker(arrow) as per user navigation on mapbox maps android

I am working on an application in which I have to rotate an arrow according to the user navigation. I am using the latest Mapbox SDK. I have tried with a barrier (calculating using lat & long) but couldn't get success. I don't have any clue that how…
Kutbi
  • 1,154
  • 2
  • 18
  • 32
5
votes
1 answer

Using MapBox to generate a route and directions for two locations

I'm attempting to show a route on a map for two specified points, with the end goal of generating step-by-step directions. I'm using the Directions API provided by MapBox and have structured my code based off of this example. The map appears to load…
Enigmatic
  • 3,902
  • 6
  • 26
  • 48
4
votes
2 answers

Show Mapbox using Jetpack Compose

Versions Mapbox 10.6.0-rc.1 Gradle 7.2.1 When I run an app mapbox tiles are black. My code: @Composable fun MapboxScreen() { Box( contentAlignment = Alignment.Center, modifier = Modifier …
4
votes
2 answers

Could not resolve mapbox-android-sdk

I am trying to add latest version of Map box, but its failing. I have followed MapBox Documentation secret token in gradle.properties file: MAPBOX_DOWNLOADS_TOKEN=MY_SECRET_MAPBOX_ACCESS_TOKEN_IN_PAIN_TEXT_WITHOUT_QUOTES Download Token is generated…
Ashvin solanki
  • 4,802
  • 3
  • 25
  • 65
4
votes
0 answers

Can not able to customise Pin(Marker) and it's info window in Mapbox, MapboxGL.MapView in React Natvie

We are developing application in React Native, our requirement is on map need to show Multiple Marker. and when user press on it should show info window with that particular location image on circle shape and arrow that indicate with marker you can…
1
2 3
37 38