1.0.5 • Published 5 years ago

naksha-react-ui-legacy v1.0.5

Weekly downloads
3
License
Apache License 2....
Repository
github
Last release
5 years ago

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) })