Skip to content

OpenPlainsInc/react-ol

Repository files navigation

(In Development) react-ol

DOI

React component library for OpenLayers.

Example

<Map center={center} zoom={zoom} projection={projection}>
    <Layers>
        <TileLayer source={nlcdsource} opacity={0.75}/>
        <TileLayer source={osmSource} opacity={0.5}/>
        <VectorTileLayer 
            layerName="counties"
            zIndex={1}
            minZoom={4}
            declutter={true}
            renderMode="vector"
            style={countiesStyleWithLabel}
            source={countySource}
        />
        <VectorTileLayer 
            layerName="seletedCounties" 
            renderMode="vector"
            source={countySource} 
            style={countyStyle}
        />
    </Layers>

    <Controls>
        <FullScreenControl />
        <ZoomSliderControl />
        <ScaleLineControl />
    </Controls>
              
    <Interactions>
        <Draw source={pointSource}></Draw>
    </Interactions>

    <Events>
        <OnMapEvent eventName='click' eventHandler={onClickEvent}></OnMapEvent>
    </Events>
</Map>

About

React component library for OpenLayers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published