nativescript-community / nativescript-community/ui-mapbox

[Android] Map ignoring Zoom level property

Open
#90 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
38
Forks
26
PR merge metrics
No merged PRs in 30d

Description

I'm creating a map programatically with these settings:

         const settings = {
            container: contentView,
            accessToken: MAPBOX_ACCESS_TOKEN,
            style: MapStyle.LIGHT,
            center: {
                lat: 53.4108223,
                lon: -2.2775411
            },
            zoomLevel: 0,
            delay: 0,
            showUserLocation: true, // default false
            hideAttribution: false, // default false
            hideLogo: false, // default false
            hideCompass: true, // default false
            disableRotation: true, // default false
            disableScroll: false, // default false
            disableZoom: false, // default false
            disableTilt: true, // default false            
        }

Everything works fine except for the zoomLevel parameter, which seems to be ignored when the map loads.

I've also tried the following but it's also being ignored:

        mapView.on('mapReady', function (args: any) {
            console.log("Social map: onMapReady fired.");
            mapView.setZoomLevel(
                {
                    level: 0,
                    animated: true,
                }
            );
            }

I'm running Android, NS 8.3.1, Angular 14 and the plugin version 6.2.15

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Android map with the shown settings and the mapReady handler, focusing on the zoomLevel setting and setZoomLevel call. Trace how the plugin handles those entry points and verify that an initial level of 0 is applied when the map loads.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, angular, typescript
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.