pavel-corsaghin / react-native-leaflet

A LeafletView component using WebView and Leaflet map for React Native applications
MIT License
99 stars 42 forks source link

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

Open johnsan96 opened 10 months ago

johnsan96 commented 10 months ago

hey, how do I hide the zoomcontrol-buttons?

miallo commented 10 months ago

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 commented 9 months ago

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 commented 4 months ago

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