react-native-leaflet icon indicating copy to clipboard operation
react-native-leaflet copied to clipboard

disable zoom-button on the top-left??

Open johnsan96 opened this issue 1 year ago • 3 comments

hey, how do I hide the zoomcontrol-buttons?

johnsan96 avatar Aug 25 '23 14:08 johnsan96

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.

miallo avatar Aug 27 '23 09:08 miallo

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.

edgarberm avatar Sep 21 '23 08:09 edgarberm

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

delfimvenceslau avatar Feb 19 '24 19:02 delfimvenceslau