Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Tiles when using UrlTile component #4477

Closed
stdavis opened this issue Oct 10, 2022 · 6 comments
Closed

Missing Tiles when using UrlTile component #4477

stdavis opened this issue Oct 10, 2022 · 6 comments
Labels
bug Something isn't working released on @beta

Comments

@stdavis
Copy link
Contributor

stdavis commented Oct 10, 2022

Summary

I'm seeing missing tiles very regularly in my map when using a custom tile provider via UrlTile. This is on Android only. I never see missing tiles in iOS.

Samsung Galaxy S8 (Android 9)
image

Google Pixel 4 (Android 13)
image

Reproducible sample code

import { Platform } from 'react-native';
import MapView, { MAP_TYPES, UrlTile } from 'react-native-maps';

export default function Map() {
  return (
    <MapView
      initialRegion={{
        latitude: 38.38576,
        longitude: -112.660201,
        latitudeDelta: 0.1,
        longitudeDelta: 0.05,
      }}
      loadingEnabled={true}
      mapType={Platform.select({ android: 'none', ios: MAP_TYPES.STANDARD })}
      maxAltitude={650}
      maxZoomLevel={18}
      minZoomLevel={5}
      pitchEnabled={false}
      rotateEnabled={false}
      showsBuildings={false}
      showsCompass={false}
      showsMyLocationButton={false}
      showsPointsOfInterest={false}
      showsScale={false}
      toolbarEnabled={false}
    >
      <UrlTile
        doubleTileSize={true}
        minimumZ={3}
        shouldReplaceMapContent={true}
        tileSize={384}
        urlTemplate='https://discover.agrc.utah.gov/login/path/export-cherry-explore-nuclear/tiles/hybrid_basemap/{z}/{x}/{y}.jpg'
        zIndex={-5}
      />
    </MapView>
  );
}

Steps to reproduce

Open this map in an expo dev client and zoom and pan around. It never takes me more than a few seconds to find tiles that do not load.

Please note that this is a temporary base map URL that will expire in 4 weeks since this is licensed imagery.

Expected result

I expect every tile to load. This is my experience in iOS. I also use this base map service in many other apps and I don't have the issue of missing tiles.

Actual result

Random tiles never load.

React Native Maps Version

1.3.1

What platforms are you seeing the problem on?

Android

React Native Version

0.69.6

What version of Expo are you using?

SDK 46

Device(s)

Google Pixel 4 (Android 13), Samsung Galaxy S8 (Android 9)

Additional information

Thanks for the AWESOME project!

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 10, 2022
@stdavis
Copy link
Contributor Author

stdavis commented Dec 12, 2022

This is still an issue. I'd love help in knowing where to get started in fixing this.

@github-actions github-actions bot removed the stale label Dec 13, 2022
@stdavis
Copy link
Contributor Author

stdavis commented Jan 24, 2023

I did some more looking into this issue today and found through the network inspector that the tiles are being requested and returned successfully. So it's not a network/request issue. The tiles are making it to the device successfully.

stdavis added a commit to stdavis/react-native-maps that referenced this issue Jan 30, 2023
Before this change, the else if statement on 216 would never run since
the condition (`image == null && !this.offlineMode`) matches the
previous if statement. Making it an independent if statement fixes
the issue.

Fixes: react-native-maps#4477
stdavis added a commit to stdavis/react-native-maps that referenced this issue Feb 6, 2023
Before this change, the else if statement on 216 would never run since
the condition (`image == null && !this.offlineMode`) matches the
previous if statement. Making it an independent if statement fixes
the issue.

Fixes: react-native-maps#4477
stdavis added a commit to stdavis/react-native-maps that referenced this issue Apr 24, 2023
Before this change, the else if statement on 216 would never run since
the condition (`image == null && !this.offlineMode`) matches the
previous if statement. Making it an independent if statement fixes
the issue.

Fixes: react-native-maps#4477
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If the issue remains relevant, simply comment Still relevant and the issue will remain open. Thank you for your contributions.

@github-actions github-actions bot added the stale label Apr 25, 2023
@stdavis
Copy link
Contributor Author

stdavis commented Apr 25, 2023

This is still relevant but will hopefully be closed soon.

stdavis added a commit to stdavis/react-native-maps that referenced this issue Apr 25, 2023
Before this change, the else if statement on 216 would never run since
the condition (`image == null && !this.offlineMode`) matches the
previous if statement. Making it an independent if statement fixes
the issue.

Fixes: react-native-maps#4477
@github-actions github-actions bot removed the stale label Apr 26, 2023
monholm pushed a commit that referenced this issue Apr 28, 2023
Before this change, the else if statement on 216 would never run since
the condition (`image == null && !this.offlineMode`) matches the
previous if statement. Making it an independent if statement fixes
the issue.

Fixes: #4477
react-native-maps-bot pushed a commit that referenced this issue Apr 28, 2023
# [2.0.0-beta.8](v2.0.0-beta.7...v2.0.0-beta.8) (2023-04-28)

### Bug Fixes

* **android:** prevent random, missing tiles if caching locally ([#4598](#4598)) ([668e837](668e837)), closes [#4477](#4477)
@react-native-maps-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 2.0.0-beta.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released on @beta
Projects
None yet
Development

No branches or pull requests

3 participants