This example shows a minimal <Map>
using a single layer with the <OSM>
source.
The map's <View>
is given an initial set of options
. The options
property is
an object passed to the underlying constructor. You can use this property to configure
components that your application will not control or update.
import React from 'react';
import Map from '@planet/maps/Map.js';
import View from '@planet/maps/View.js';
import TileLayer from '@planet/maps/layer/WebGLTile.js';
import OSM from '@planet/maps/source/OSM.js';
function Basic() {
return (
<Map>
<View options={{center: [0, 0], zoom: 1}} />
<TileLayer>
<OSM />
</TileLayer>
</Map>
);
}
export default Basic;