Questions tagged [mapbox-android]

1

votes
2

answer
218

Views

How can I resolve this Failed to resolve: com.mapbox.navigator:mapbox-navigation-native:3.1.3?

I am experiencing a problem with mapbox-android-navigation: Failed to resolve: com.mapbox.navigator:mapbox-navigation-native:3.1.3 | MAPBOX** dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:27.1.0' implementation 'com.android....
Danny Korbold
0

votes
2

answer
13

Views

Mapbox Android Marker deprecated API 21+

Android studio tell me, that the markers in Mapbox are deprecated (API level 21+, mapbox-android-sdk:7.2.0). But in the official documentation the example is: mapboxMap.addMarker(new MarkerOptions() .position(new LatLng(48.85819, 2.29458)) .title('Eiffel Tower')); Should I add markers this way or th...
Spongi
1

votes
2

answer
165

Views

[Android][Mapbox] How to add others tile source to Mapbox map?

I'm looking for a solution to add other tile source to Mapbox map. For example, I have an tile source url like this https://tile.openstreetmap.org/{z}/{x}/{y}.png and I want to add this tile above original Mapbox Layer. I intend to use RasterLayer, but I don't know which url format should be inputed...
Luc Le
1

votes
0

answer
397

Views

mapbox navigation android - fragment - failed to call observer method

I created a small project to show the error I have on the MapBox Navigation library. I would like to know if it comes from an element in the life cycle or the SDK used directly? The difficulty lies in the fact that I would like the fragment to restart the navigation service at each arrival on it. Li...
Thomas Gonzalez
1

votes
0

answer
242

Views

How to detect I'm near a waypoint

I want to make a navigation application on Android (Kotlin) using the mapbox-android SDK. I need to create a route with specific waypoints and want to know when I am near one of those waypoints (200m before for example). I already managed to display a map with my waypoints with the NavigationRoute o...
Sébastien STOLZ
1

votes
0

answer
277

Views

How do I search mapbox geocoder via poi categories?(fuel/gas stations/restaurant)

I been adding mapbox to my app and I got the geocoder to search using auto complete. I can't figure how to search categories tho. Is that feature not yet available? The API documents show it as 'preview' and I also found this link. https://github.com/mapbox/MapboxGeocoder.swift/issues/119 This w...
james burnison
1

votes
0

answer
339

Views

Using a cordova / PhoneGap Mapbox Plugin to display maps

I'm trying to build an app using the PhoneGap tool set and want to show a map using mapbox. I'm developing it in html, js & css and testing it on an android device using the PhoneGap desktop server tool. I have successfully integrated the plugin via the config.xml file And I have tried to reference...
Gideon
1

votes
1

answer
103

Views

Android MapBox cannot load map from OOB (APK expansion) file

I have offline map from MapBox, when i load the map from assets folder all work fine 'sources': { 'mapbox': { 'tiles': [ 'asset://mapparis/{z}/{x}/{y}.pbf' ], 'type': 'vector' } } But when i load the map from mounted OBB file 'sources': { 'mapbox': { 'tiles': [ '/mnt/obb/a2d68a13d68baf704a98a82bc8f...
Pavel Poley
1

votes
0

answer
119

Views

Listeners for NavigationUI, set on NavigationViewOptions not working

I'm using mapbox-android-navigation and navigation-ui, version 0.11.1, to display turn-by-turn for routes I'm creating. Everything is working great, except I'm not getting callbacks from the navigation UI. Specifically, I've set listeners on my NavigationViewOptions object as directed. But the lis...
TonyC
1

votes
0

answer
33

Views

Styled map freeze Android Mapbox 6.1.1

Im getting a screen freeze when using a styled map built using mapbox studio. The only thing we did in the styled map is add another layer. We tested already running the map using the default style, and there is no problem, the custom-styled map gives lag(freeze screen) in the portion of the map whe...
Hohenheim
1

votes
0

answer
62

Views

How do I colorize an image in Mapbox SymbolLayer?

I'm using Mapbox to render some Point GeoJSON data. How do I colorize an icon using SymbolLayer on Android? This seems to be causing a lot of trouble to others as well. This question is exactly mine: https://github.com/mapbox/mapbox-gl-js/issues/1594 val symbolLayer = SymbolLayer('clientLocationsPoi...
jervine10
1

votes
0

answer
112

Views

How to add multiple layers on Mapbox Android?

Right now I have three layers on my app and have a button for each of them. Each of the button toggles the designated layer, so when you want to show or hide the layer, you just need to click the button. However, this can be super inefficient and won't work if I wanted to have 10 layers. That means...
Fairly
1

votes
0

answer
77

Views

How to Launch mapbox Navigation-ui?

I am working in Mapbox sdk, I integrated the sdk and i can show the current location and drop pin on touching the map. But when i call for navigation route it giving me a error message 'Unable to place request on backend'. Any body know why it showing this message? Do i need a Paid Mapbox account? T...
Munavvar
1

votes
0

answer
146

Views

How to detect the direction of a suggested route in MapBox Directions API?

I am working on a project where I create an app that will direct users through a college campus using AR (Much like the one shown here: https://www.youtube.com/watch?v=vRmTn25xm7Q (7:20)). I am starting off with the Navigation API for Android from MapBox. I want to know if there is any possible way...
1

votes
1

answer
84

Views

How can I zoom on a routes

what is the better way for zoom the map to show all the route after getting it? I tried to do it with my Origin and Destination, but not working well if the route go over or down those.
JFDionne
1

votes
0

answer
39

Views

React native app gets crashed whenever I'm using mapbox

Hey can anyone help me with react-native and mapbox? Whenever I'm running the command react-native run-android it first starts the app and immediately the app gets crashed
aditya dehal
1

votes
0

answer
150

Views

Mapbox for Android: How to select a feature within a layer?

I am following the example for iOS: https://github.com/mapbox/ios-sdk-examples/blob/master/Examples/Swift/FeatureSelectionExample.swift Basically it works like this: 1) The user taps on the map. 2) Get the name of the selected state. 3) Highlight the selected state. Here is the Swift code in iOS: @o...
thstart
1

votes
0

answer
18

Views

mapbox SDK , is there any other Authentication technique we can use to protect map url (self hosted)?

Currently we have installed Vector tiles in our own server and we can Access those from mapbox SDK i.e mapView.setStyleUrl('http://ourserveraddress.com/styles/bright/style.json'); but as you can see this url is open and any one can access it. Since we are not using Mapbox Access Token , how can we p...
alammd
1

votes
0

answer
54

Views

Mapbox does not provide current location in devices that does not support Google play service

I have tried fetching location from Mapbox using the LocationLayerplugin, but it does not seem to work in devices that does not support Google Play Services. It works fine in devices that support play services. Are we blocked to use location services in android devices that does not support play se...
abhishek maharajpet
1

votes
1

answer
24

Views

MapBox Android - issue to find equivalent expression when migrating from 5.1.5 to 6.5.0

I'm updating an application working with MapBox (migrating from 5.1.5 to 6.5.0). Now, everything works fine (with LocationEngine CompassEngine, new class/package naming, etc.) but I'm facing an issue to find the equivalent expression (in 5.1.5) : PropertyFactory.lineWidth(CameraFunction.zoom(Expone...
sokarcreative
1

votes
0

answer
70

Views

Animating a Polyline in Android-Mapbox

I'm trying to animate a Polyline on MapboxMap using ValueAnimator. I've found many solutions but those were on google maps, and tried to implements the logic but no luck, here is the code I've written so far: public static void addHistoryLine(final MapboxMap mapboxMap, final List cords) { final Poly...
Yasir Ghafar
1

votes
0

answer
42

Views

How to control the z axis of individual Mapbox features inside the same layer?

I'm using the Mapbox Maps SDK for Android to display pins with custom icons in a map on my app. More specifically, I'm using the SymbolLayer API. When the user clicks on a pin, its appearance changes to show it is selected. However, that clicked pin is often behind other pins, like in this image: Al...
Mateus Gondim
1

votes
0

answer
64

Views

java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex || Android

** While runing the code I encounter this error 'Unable to merge dex || Android in the android studio This is basically use of map in the android application** This is the Build.gradle code android { compileSdkVersion 26 defaultConfig { applicationId 'com.example.npatel7.carparking' minSdkVersion 2...
Dharmendra Kumar
1

votes
0

answer
115

Views

Mapbox: Runtime styling for custom NavigationView

I created a custom NavigationView Fragment which I am calling from my MapView Fragment. Following the example in the documentation I tried to use runtime styling within the navigationView.xml file by creating a custom style. So far I can customize every element while starting my turn-by-turn navigat...
Janina Alisár
1

votes
0

answer
70

Views

Get geoJSON parameter from Mapbox Layer - android

I followed the Mapbox Android tutorial to draw Polygons with geoJSON: https://www.mapbox.com/android-docs/maps/overview/data-driven-styling/#geojson It works, but I thought that I could not call 'the Polygon's id' in geoJSON from a layer. I want to call this for detecting that I stand on the Polygon...
Ryosuke Sato
1

votes
0

answer
30

Views

Why does Mapbox on Android takes a long time to display user Location Dot

I am investigating the use of Mapbox on Android. implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:6.7.2' implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.24.1' implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-localization:0.5.0' implementation 'com.mapbox.mapboxsdk:m...
Hector
1

votes
1

answer
80

Views

cancelNavigation button does not go back to mapView from navigationView

I currently managed to make the navigation work with NavigationView, and now i can set the route with mapView and then start the navigationView by pressing a button on the screen. The problem is when I want to get back to mapView by pressing the X button on the bottom right of navigationView, since...
NoveB
1

votes
1

answer
169

Views

Program type already present: com.mapbox.android.core.location.GoogleLocationEngine

I'm trying to use Mapbox together with google play services location. Everything worked fine until I added implementation 'com.google.android.gms:play-services-location:16.0.0' to be able to request location updates when app in background. Gradle builds fine but when compiling the project I get the...
113408
1

votes
0

answer
27

Views

Rotate a feature at runtime and update a layer

i have some objects on the map (lets say cars). These cars produce their own location and accordingly bearing updates. Whenever we get data-updates for objects we create new Feature feature = Feature.fromGeometry( Point.fromLngLat(car.getLongitude(), car.getLatitude()) ); build a FeatureCollection f...
Ben Win
1

votes
0

answer
19

Views

Current location doesn't display immediately

I am using Mapbox Api with Android and I am trying to get the current position of the user but I can reach the current location only on closing the app and reopening it. I am using like dependencies : implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:6.8.1' implementation 'com.mapbox.mapboxsdk...
Achref ArShavin
1

votes
0

answer
19

Views

WMS Authorization header for mapBox Android SDK

How to add a Authorization header when making a call to WMS services on mapBox Android SDK. we have a satellite image service provider called Airbus. we want to make a call to their WMS restful API using mapBox Android SDK. the issue is Airbus requires us to pass a Authorization header with the key...
sizwe nduduzow
1

votes
0

answer
48

Views

Show a panel on MapBox in Android

I use MapBox in Android and show some Points on it. Now I want to show a panel top-left of map and show some information in this panel. How can i do this? (An Example show in image in URL: https://docs.mapbox.com/help/img/directions/gljs-plugin.png , a panel like that panel show in image , the black...
Reza Dehghani
1

votes
1

answer
24

Views

Mapbox: Hide traversed route after maneuver

I am curious if it is possible to adjust the route after a maneuver like you can see in this video from the Mapbox website: https://www.mapbox.com/assets/use-cases-navigation-sdk-272b22ac06adc9a4275dcc13624112d8.mp4 Goal is to hide the route which has already been traversed. I am using the mapbox na...
egcram
1

votes
0

answer
51

Views

Offline sideloading with Mapbox

So I'm trying to use the Mapbox SDK in an offline mode by merging tiles in a local DB file I created from my own tile server by using ./mbgl-offline --north [north coordinate] --west [west coordinate] --south [south coordinate] --east [east coordinate] --minZoom [minimum zoom] --maxZoom [maximum zo...
kitsuneFox
1

votes
1

answer
28

Views

Mapbox map only semi responds to panning gestures

I have implements a mapbox MapView. It appears on screen just fine, but when I try to pan the map around, it kinds moves a few pixels on the screen in the direction I intended and then it stop while my finger is still sliding. Sometimes that would happen and sometimes it wouldn't respond at all. Whe...
Tsabary
1

votes
1

answer
1.3k

Views

Hide and show markers on MapBox

When I started this, I thought this is a rather trivial feature, but I keep struggling to achieve this: On a MapBox map on Android, I want to hide all markers when I zoom out (at a certain zoom level), and show them again when I zoom in. I couldn't find any option to hide (set visibility to false) t...
Terry
1

votes
1

answer
927

Views

Mapbox - Navigating a custom route (turn-by-turn)

I've been exploring the Mapbox Map SDK and the Navigation SDK and have hit a brick wall so any help would be appreciated. I have a few routes defined in GeoJSON. Is it possible to feed this custom route in GeoJSON into the Navigation SDK and get turn-by-turn directions? Perhaps with the help of thi...
Francis Kim
1

votes
1

answer
177

Views

Mapbox Navigation SDK - Using Kilometers Instead of Miles

Quick question - does the Android Mapbox Navigation SDK allow the unit to be changed from Miles to Kilometers?
Francis Kim
1

votes
1

answer
280

Views

How can I show the popup on bottom middle of the page when clicking MapboxGL marker?

I want to show a popup on the bottom middle of the page when clicking a marker. I have used the following code new mapboxgl.Popup({ anchor: 'top' }) This shows popup on the bottom of the marker. But I want to show the popup at the bottom middle of the page
Prince
1

votes
2

answer
353

Views

How do I start an activity when the user has reached their destination?

I'm using the drop in UI for mapbox navigation in android and I want to start a new activity displaying information about a place once the user has navigated to it. How would I do that? Is there a handler to close the navigation view once done or do I have to rely on the user pressing the cancel but...
mons

View additional questions