No
Yes
react-native: 0.54.2
react: 16.0.016.3.0-alpha.1
react-native-maps: https://github.com/react-community/react-native-maps.git
Is there an option to render the map with default zoom option ? I checked props of MapView but I didn't find any about that.
@Anandks1993 The zoom is controlled by longitudeDelta and latituteDelta.
@rborn Thank you 馃
import { Dimensions } from 'react-native';
const { height, width } = Dimensions.get( 'window' );
const LATITUDE = 40.74333; // Korea Town, New York, NY 10001
const LONGITUDE = -73.99033; // Korea Town, New York, NY 10001
const LATITUDE_DELTA = 0.28;
const LONGITUDE_DELTA = LATITUDE_DELTA * (width / height);
<MapView
initialRegion={{
latitude: LATITUDE,
longitude: LONGITUDE,
latitudeDelta: LATITUDE_DELTA,
longitudeDelta: LONGITUDE_DELTA
}}
...
>
LATITUDE_DELTA = zoom level
Most helpful comment
LATITUDE_DELTA = zoom level