naksha-react-ui-legacy
v1.0.5
Published
Visualize geohash heat map or layer map from elastic search or https://github.com/strandls/naksha
Downloads
4
Maintainers
Readme
class NakshaReactUIDemo extends Component{
constructor(props) { super(props); this.state={ flag:false } }
componentDidMount() { this.setState({ flag:true }) }
map() { return ( <Naksha.MapHolder url="http://localhost:8081/naksha/services/geohash-aggregation/observation/observation" location_field="location" map_container="map2" restrict_to_bounds={[[68, 5.75], [98, 37.5]]} url_response_geohash_field="geohashAggregation" url_response_filtered_geohash_field="viewFilteredGeohashAggregation" color_scheme="YlOrRd" no_legend_stops="6" is_legend_stops_data_driven={true} /> ) }
render(){ return( <div style={{position:'relative'}}> {this.state.flag ? this.map() : null} <div id="map2" style={{height:'-webkit-fill-available'}}> </div> </div> ) } }
// map is new mapboxgl.Map map.on('load', function() { Naksha.IndiaBoundaries(map) })