I want to show a different View below map (e.g. some animation), and need to make map partially transparent for this. How can I do this with CARTO Mobile SDK?
How to make transparent map background with CARTO mobile SDK
761 views Asked by JaakL At
1
There are 1 answers
Related Questions in ANDROID
- Creating global Class holder
- Flutter + Dart: Editing name of a tab shows up a black screen
- android-pdf-viewer Received status code 401 from server: Unauthorized
- Sdk 34 WRITE_EXTERNAL_STORAGE not working
- ussd reader in Recket Native module
- Incorrect display of LinearGradientBrush in IOS
- The Binary Version Of its metadata is 1.8.0, expected Version is 1.6.0 build error
- I can't make TextInput to auto expand properly in Android
- Creating multiple instances of a class with different initializing values in Flutter
- How to create a lottie animation
- making android analyze with coverity sast tool
- Flutter plugin development android src not opening after opening example
- I initialize my ViewModel in the Activity with several fragments as tabs, but the fragments(tabs) return null for the updated livedata
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- How I can use the shared preferences class?
Related Questions in IOS
- URLSession requesting JSON array from server not working
- Incorrect display of LinearGradientBrush in IOS
- Module not found when building flutter app for IOS
- How to share metadata of an audio url file to a WhatsApp conversation with friends
- Occasional crash at NSURLSessionDataTask dataTaskWithRequest:completionHandler:
- Expo Deep linking on iOS is not working (because of Google sign-in?)
- On iOS, the keyboard does not offer a 6-character SMS code
- Hi, there is an error happened when I build my flutter app, after I'm installing firebase packages occurs that error
- The copy/paste functionalities don't work only on iOS in the Flutter app
- Hide LiveActivityIntent Button from Shortcuts App
- While Running Github Actions Pipeline: No Signing Certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID
- Actionable notification api call not working in background
- Accessibility : Full keyboard access with scroll view in swiftui
- There is a problem with the request entity - You are not allowed to create 'iOS' profile with App ID 'XXXX'
- I am getting "binding has not yet been initialized" error when trying to connect firebase with flutter
Related Questions in CARTODB
- Failed to initialize Carto Mobile Maps SDK, native .so library failed to load?
- Cartodb.js Uncaught Error: sublayers are read-only in Named Maps
- CARTO Dynamic Tiling: how to clear the tile cache?
- CartoAPIError: Map instantiation API request failed?
- deck.gl styles certain parts of map not others
- How to hide ApiKey in Carto Layer request with DeckGl?
- Best way to show/hide CARTO layers using latest CARTO/DeckGL libraries in JS
- Is there a way to insert/embed CARTO maps in a Streamlit app?
- Having an issue seeing the heat signature on the map using HeatMapWithTime
- Popup content will not appear in the UI - CartoDB Web Mapping Application
- Mapbox display tile borders on polygon styled as line
- Download GeoJSON file using SQL API call with PHP
- Leaflet js cant load map photos
- Deck.GL with CARTO and React
- Can sql queries vary by coulmns?
Related Questions in CARTO-MOBILE
- Why mapBox runs without any error but with same codes the carto-Map gives "Animators may only be run on Looper threads"
- Issue with fetching a custom tileset from CARTO and displaying it on a MapBox map iOS Swift
- Carto Mobile SDK: How to zoom-in when cluster is clicked
- Carto Mobile: How to avoid clustering of points with related balloon popups
- Dont work Get x and y pixel of touched in version 4.2.0 to high of Carto mobile SDK
- Carto MapView re-use causes crash
- LineStyleBuilder and similar cannot resolve setColor() and other functions
- Load vector tiles from folder instead than from MBTiles file
- Get x and y pixel of touched MapTile in Carto mobile SDK
- How can I add a customised Carto Map Marker via Carto Map Moblie SDK.UWP?
- How to Move Map in Background with Fixed Marker Pin in Carto Mobile Swift
- Why does Carto Package Manager can't connect to it's database after resuming?
- Avoid alpha summation in Line that overlap itself in Carto Mobile SDK
- How to make transparent map background with CARTO mobile SDK
- How to verify that a Map Position is inside the Map Bounds using carto-mobile SDK
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Ok, thanks for asking, this actually wasn't the most trivial task.
Details depend what parts of map you want to make transparent. Let's assume you want to sea areas transparent. Essentially, you have four different levels that need to be transparent then:
My example snippets are in Swift, but should be easily convertible to other languages.
In Carto's Mobile SDK, the land is actually solid background color covering whole map, water is placed on top of it as blue (or dark)-colored polygons. So if you wish to make the water layer transparent, you also need to make the map background transparent, but this creates also transparent land. To avoid this you need to 'color' land side with some polygons; normal vector tiles do not have land coverage, but we have created special tileset in a mapbox account, what you can use as VectorTileLayer:
Now that you've got your land area colored, you would add another layer with real basemap. For this we need a customized basemap style - with transparent water/sea - and bundle it with your app. Carto's Voyager style is available here.
Unzip it, and make the following changes in the following files:
hydro.mss:
style.mss:
Compress the files (make sure there is no folder in zip, else the SDK won't find any files) and add the new style to your
assetsfolder (if Android) or anywhere (if iOS).Now you can load your style from an asset file like this:
Then set your GlView's background transparent, and set mapview background bitmap to null, and you're ready to go:
When you're developing Android, you also need to add the following two lines for the transparent NTMapView background to properly render, else it'll stay black:
Here I've set the parent views background to red. Now I see the following when the MapView renders: