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

disable zoom-button on the top-left?? #35

Open
johnsan96 opened this issue Aug 25, 2023 · 3 comments
Open

disable zoom-button on the top-left?? #35

johnsan96 opened this issue Aug 25, 2023 · 3 comments

Comments

@johnsan96
Copy link

hey, how do I hide the zoomcontrol-buttons?

@miallo
Copy link
Contributor

miallo commented Aug 27, 2023

Unfortunately it is not possible (easily), since they are hardcoded in a minified html-file: https://github.com/pavel-corsaghin/react-native-leaflet/blob/main/android/src/main/assets/leaflet.html
You would need to patch this file for this to work right now.

@edgarberm
Copy link

In my case I have been able to solve this issue by making two wrappers for the map, this way the map overflows horizontally and the zoom controls are out of view and the idea is to replace them with custom ones.

 <View style={styles.map}>
  <View style={styles.mapInner}>
    <LeafletView mapLayers={[...]}/>
  </View>
</View>
const styles = StyleSheet.create({
  map: {
    justifyContent: 'center',
    alignItems: 'center',
    width: Dimensions.get('window').width,
    height: 300,
  },
  mapInner: {
    width: Dimensions.get('window').width + 86,
    height: '100%',
  },
}

I hope it will be helpful.

@delfimvenceslau
Copy link

Hello can tell me how to use Map Layers with subdomains?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants