mapbox-gl-native | thoroughly customizable maps in native Android | Map library

 by   mapbox C++ Version: 3.4.2 License: Non-SPDX

kandi X-RAY | mapbox-gl-native Summary

kandi X-RAY | mapbox-gl-native Summary

mapbox-gl-native is a C++ library typically used in Geo, Map applications. mapbox-gl-native has no bugs, it has no vulnerabilities and it has medium support. However mapbox-gl-native has a Non-SPDX License. You can download it from GitHub.

A C++ library that powers customizable vector maps in native applications on multiple platforms by taking stylesheets that conform to the Mapbox Style Specification, applying them to vector tiles that conform to the Mapbox Vector Tile Specification, and rendering them using OpenGL or Metal.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              mapbox-gl-native has a medium active ecosystem.
              It has 4246 star(s) with 1350 fork(s). There are 311 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 290 open issues and 7969 have been closed. On average issues are closed in 117 days. There are 14 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of mapbox-gl-native is 3.4.2

            kandi-Quality Quality

              mapbox-gl-native has no bugs reported.

            kandi-Security Security

              mapbox-gl-native has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              mapbox-gl-native has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              mapbox-gl-native releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of mapbox-gl-native
            Get all kandi verified functions for this library.

            mapbox-gl-native Key Features

            No Key Features are available at this moment for mapbox-gl-native.

            mapbox-gl-native Examples and Code Snippets

            No Code Snippets are available at this moment for mapbox-gl-native.

            Community Discussions

            QUESTION

            Sizing UIButton depending on length of titleLabel
            Asked 2021-Oct-29 at 21:51

            So I have a UIButton and I'm setting the title in it to a string that is dynamic in length. I want the width of the titleLabel to be half of the screen width. I've tried using .sizeToFit() but this causes the button to use the CGSize before the constraint was applied to the titleLabel. I tried using .sizeThatFits(button.titleLabel?.intrinsicContentSize) but this also didn't work. I think the important functions below are the init() & presentCallout(), but I'm showing the entire class just for a more complete understanding. The class I'm playing with looks like:

            ...

            ANSWER

            Answered 2021-Oct-25 at 19:13

            The UIButton class owns the titleLabel and is going to position and set the constraints on that label itself. More likely than not you are going to have to create a subclass of UIButton and override its "updateConstraints" method to position the titleLabel where you want it to go.

            Your code should probably not be basing the size of the button off the size of the screen. It might set the size of off some other view in your hierarchy that happens to be the size of the screen but grabbing the screen bounds in the middle of setting a view's size is unusual.

            Source https://stackoverflow.com/questions/69712171

            QUESTION

            undefined reference to `clCreateCommandQueueWithProperties' despite ocl-icd-opencl-dev is installed
            Asked 2021-Aug-13 at 05:25

            During compilation, I am compiling a large program. One compilation step gives me the following error:

            clang++ -o selfdrive/camerad/camerad -Wl,--as-needed -Wl,-rpath=/home/ziyuan/openpilot/phonelibs/snpe/x86_64-linux-clang -Wl,-rpath=/home/ziyuan/openpilot/cereal -Wl,-rpath=/home/ziyuan/openpilot/selfdrive/common selfdrive/camerad/main.o selfdrive/camerad/cameras/camera_common.o selfdrive/camerad/transforms/rgb_to_yuv.o selfdrive/camerad/imgproc/utils.o selfdrive/camerad/cameras/camera_frame_stream.o -Lphonelibs/snpe/x86_64-linux-clang -Lphonelibs/libyuv/x64/lib -Lphonelibs/mapbox-gl-native-qt/x86_64 -Lcereal -Lselfdrive/common -L/usr/lib -L/usr/local/lib -Lcereal -Lphonelibs -Lopendbc/can -Lselfdrive/boardd -Lselfdrive/common -lm -lpthread selfdrive/common/libcommon.a -ljson11 -ljpeg -lOpenCL cereal/libcereal.a cereal/libmessaging.a -lzmq -lcapnp -lkj cereal/libvisionipc.a selfdrive/common/libgpucommon.a -lGL

            /usr/bin/ld: selfdrive/camerad/cameras/camera_common.o: in function CameraBuf::init(_cl_device_id*, _cl_context*, CameraState*, VisionIpcServer*, int, VisionStreamType, VisionStreamType, void (*)(void*, int))': /home/ziyuan/openpilot/selfdrive/camerad/cameras/camera_common.cc:92: undefined reference to clCreateCommandQueueWithProperties'

            When I check the linker, I got the following:

            ...

            ANSWER

            Answered 2021-Aug-13 at 05:25

            As also answered here, clCreateCommandQueueWithProperties is an OpenCL 2.0 thing. Nvidia GPUs only support OpenCL 1.2. Nvidia recently "upgraded" to OpenCL version 3.0, but this is just a new name for version 1.2. OpenCL 2.0 features are still not supported.

            Source https://stackoverflow.com/questions/68762588

            QUESTION

            Mapbox compile offline tool on Linux
            Asked 2021-May-26 at 10:15

            I am trying to compile the Mapbox GL offline tool (mbgl-offline) on Linux to generate a database with offline data for a specific region.

            Steps followed as posted in github repository to compile the offline tool on Linux but it failed:

            • git clone --recurse-submodules https://github.com/mapbox/mapbox-gl-native.git
            • cd mapbox-gl-native
            • make offline (i tried also make mbgl-offline)
            • compilation failed: Error message: make: *** No rule to make target 'offline'. Stop.

            Any idea what is going wrong with compilation of the tool ?

            ...

            ANSWER

            Answered 2021-May-26 at 10:15

            The README.md clearly states how to build Mapbox: Developing

            You tried to compile it with make, but if you look around the repository there are a lot of CMakeLists.txt, which indicates that you should use CMake to compile it.

            These are the steps I followed to build it:

            Source https://stackoverflow.com/questions/67637722

            QUESTION

            Mapbox in Android - Black color around GEOTiff raster layers
            Asked 2020-May-28 at 14:11
            Goal

            I need to add some aeronautical layers taken from FAA to the map. The layers are provided as GeoTIFF files.

            Steps
            1. Downloaded a GeoTiff file from FAA website.
            2. Using QGis app clipped the legend from the file. Actually the issue occurs without this step as well.
            3. Reprojected it to EPSG:3857 using GDAL command gdalwarp -q -t_srs EPSG:3857 -dstalpha -of vrt Albuquerque\ SEC\ 104-cut.tif /vsistdout/ | gdal_translate -co compress=lzw /vsistdin/ Albuquerque\ SEC\ 104-north-up-cut.tif. Otherwise I got Error creating Mapnik Datasource: Invalid raster: Invalid rotation value in geotransform array when uploading to Mapbox.
            4. Created a Tileset by uploading GeoTIFFs to Mapbox.
            5. Created a new style in the Mapbox Studio.
            6. Added the tilesets as layers.
            Mapbox Studio Result

            The map is showing well in Mapbox Studio:

            Android Result

            However in Android app this style shows with some black borders of random width depending on zoom level and camera position. Here is how it looks in android:

            I tried it on Pixel 3a (Android 10), Nexus 5x (Android 8.1) and Android emulator (Android 10). I have good internet connection and gave it enough time so the tiles are loaded.

            The source code where the map is embedded is official Demo app. I just replaced token and style URL:

            ...

            ANSWER

            Answered 2020-May-28 at 14:11

            The black borders should be transparent, but the raster image format Mapbox is using (JPG) does not support transparency, which is a known issue that exists in every gl-native-based SDK. This issue presents itself when you reference a style that has the raster layer built in.

            As a workaround, you can follow Mapbox's troubleshooting guide on troubleshooting raster images with black backgrounds to make your tileset transparent and then add the tileset as a RasterSource within your Android application to display the raster tile as expected.

            Please take a look at the following example as a reference for adding a RasterSource:

            Instead of calling the rasterSource using "mapbox://username.tilesetID", you need to call it similarly to the Add a WMS Source example. The code below will resolve your issue:

            style.addSource(RasterSource( "albuquerque-source", TileSet( "tileset", "https://api.mapbox.com/v4//{z}/{x}/{y}.png?access_token=" ), 256 ))

            Source https://stackoverflow.com/questions/61141793

            QUESTION

            Convert mbgl-offline db to mbtiles
            Asked 2020-Apr-09 at 10:13

            I'm trying to implement mapbox offline in my flutter application... until now I'm using the repository https://github.com/mapbox/mapbox-gl-native to get the map but this map comes in format *.db which is a SQLite format.

            Now if I want to use that map (in format .db) in flutter I found the package https://github.com/tobrun/flutter-mapbox-gl where it has an instructions for loading the map (.db) ...

            Now, that library is so basic .. I can't do more things like put markers or anything else.. that's why I'm trying to use the other library which is more common in fluter and is called 'flutter_map' and it has a way to load offline maps but the problem here is that I need '{x}{y}{z}.png' that's an image format.

            Finally my question is: How can I pass from my map (.db) to that format ({x}{y}{z}.png) ??? or maybe ... how to convert (.db) to (*.mbtiles) ?? cause the last one is more common.

            Thanks again!

            ...

            ANSWER

            Answered 2020-Apr-09 at 10:13

            Mapbox offers the Raster Tiles API which will serve map tiles in ({x}{y}{z}.png) format. https://docs.mapbox.com/api/maps/#raster-tiles These images will be satellite imagery though.

            Mapbox also offers the Vector Tiles API which serves map tiles in .mvt format. https://docs.mapbox.com/api/maps/#vector-tiles

            Conversion to .mbtiles

            Source https://stackoverflow.com/questions/61113784

            QUESTION

            Mapbox GL Native doesn't build ubuntu18
            Asked 2020-Apr-06 at 05:35

            I'm trying to build Mapbox GL Native using cmake .. so I cloned the repository from GitHub:

            ...

            ANSWER

            Answered 2020-Apr-06 at 05:35

            If your OpenGL library path installation is defined in your ENV path, you want to set up your CMAKE_PREFIX_PATH to your OpenGL installation path (you could set it in your top level CMakeList.txt).

            Source https://stackoverflow.com/questions/61049246

            QUESTION

            Cannot deploy function that makes use of mapbox-gl-native library to Azure
            Asked 2020-Mar-23 at 01:54

            When I attempt to deploy an Azure function that makes use of the mapbox-gl-native library I get this error in the logs:

            ...

            ANSWER

            Answered 2020-Mar-23 at 01:54

            I check the mapbox-gl-native module and I found it's powered by vector tiles and OpenGL. Here is the problem, you will not be able to usethis module due to the GDI sandbox restrictions (GDI - which openGL relies on).

            Further more information you could refer to here: Win32k.sys (User32/GDI32) Restrictions.

            Source https://stackoverflow.com/questions/60782174

            QUESTION

            Null point Exception error in MapBlocks Android
            Asked 2020-Feb-18 at 18:07

            I am trying to follow This tutorial and I am getting an error This is the stack trace

            ...

            ANSWER

            Answered 2020-Feb-18 at 18:07

            That YouTube video you're following is a bit old. Setting up a simple MapView is now done differently. For example, you can't set a map style URL via XML anymore.

            https://docs.mapbox.com/android/maps/examples/create-a-simple-map-view shows the basic way to set up a Mapbox map.

            Source https://stackoverflow.com/questions/60252790

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install mapbox-gl-native

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i mapbox-gl-native

          • CLONE
          • HTTPS

            https://github.com/mapbox/mapbox-gl-native.git

          • CLI

            gh repo clone mapbox/mapbox-gl-native

          • sshUrl

            git@github.com:mapbox/mapbox-gl-native.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link