question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Post-Expressions Update: Initial Map Zoom and Coords Not Correct

See original GitHub issue

Describe the bug Initial Map Zoom and Coords Not Correct Reference #4

To Reproduce With newest expression merged on master installed, load map with initial center and coordinates defined:

      <Mapbox.MapView
        zoomLevel={8}
        centerCoordinate={[-111.8678, 40.2866]}
        style={styles.map}
        showUserLocation={true}
>

Expected behavior Map zoom/center coords should load initially as before.

Screenshots Resulting map regardless of center/coords defined:

Screen Shot 2019-04-30 at 4 30 53 PM

Versions (please complete the following information):

  • Platfrom: iOS
  • Device: Simulator Xr
  • React Native Version 0.59

Additional context

A big thank you and shoutout to @mfazekas for the recent expressions updates. The good news is we have the newest custom maps in Mapbox Studio working and displaying:

Screen Shot 2019-04-30 at 4 48 52 PM

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
mfazekascommented, May 1, 2019

@systemlevel thanks for trying out the new branch.

We need a doc update/rewrite, on how to migrate code for the new mapbox.

As mentioned in https://github.com/react-native-mapbox/maps/pull/4#issue-270304205

<Mapbox.MapView
        zoomLevel={8}
        centerCoordinate={[-111.8678, 40.2866]}
        style={styles.map}
        showUserLocation={true}
...
<Mapbox.MapView>

is now

<Mapbox.MapView
        style={styles.map}
        
>
    <Mapbox.Camera
       zoomLevel={8}
        centerCoordinate={[-111.8678, 40.2866]}
     />
    <Mapbox.UserLocation 
         showUserLocation={true}
     />
...
</Mapbox.MapVIew>
```
0reactions
systemlevelcommented, May 1, 2019

All issues have been addressed and updated docs to follow. Closing this out for now…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Initial zoom level is ignored. Maps open fully-zoomed in.
This issue applies to both a View (displaying a single point), and the Geolocation field map on the Edit form. It does not...
Read more >
drift of coordinates after zooming #426 - Leaflet/Leaflet - GitHub
The issue seems to be occurring only when width and/or height of the map's container element is odd. When the map is zoomed...
Read more >
Map Projection is not working as expected when zoom level is ...
The problem is first it zooms somewhere over ocean and then immediately in 5 seconds, it zooms on the desired location (top of...
Read more >
Elegant ways to express coordinates and zoom level in urls
To make sharing map locations more natural I'm looking at updating a map service to sync the browser url with the current center...
Read more >
Controlling Zoom and Pan | Maps JavaScript API
Overview. The usage of a map on a web page may require specific options to control the way users interact with the map...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found