How to use wicket - 2 common examples

To help you get started, we’ve selected a few wicket examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ali1k / ld-r / components / object / viewer / aggregate / BasicAggregateMapView.js View on Github external
this.props.spec.instances.forEach((node, index)=> {
            if(!node){
                return undefined; // stop processing this iteration
            }
            if(node.weight){
                weightArr.push(node.weight);
            }
            if(node.hint){
                hintArr.push(node.hint);
            }
            if (node.value.indexOf('POLYGON') !== -1 || node.value.indexOf('Polygon') !== -1 || node.value.indexOf('MULTIPOLYGON') !== -1 || node.value.indexOf('MultiPolygon') !== -1 || node.value.indexOf('LineString') !== -1 || node.value.indexOf('MultiLineString') !== -1) {
                let wkt = new Wkt.Wkt();
                wkt.read(node.value);

                if(wkt.components && wkt.components.length && wkt.components[0].length){
                    zoomLevel = 8;
                    if(this.props.zoomLevel){
                        zoomLevel = this.props.zoomLevel;
                    }
                    try {
                        if(!focusPoint){
                            focusPoint = self.getFocusPoint(node.value, wkt.components);
                        }
                        shapesArr.push(wkt.toJson());
                    }
                    catch(err) {
                        console.log(err.message);
                    }
github ali1k / ld-r / components / object / viewer / individual / BasicMapView.js View on Github external
if(this.props.config && this.props.config.shapeColor){
            shapeColor = this.props.config.shapeColor;
        }
        let mapHeight, mapWidth;
        if(this.props.config){
            if(this.props.config.mapHeight){
                mapHeight = this.props.config.mapHeight;
            }
            if(this.props.config.mapWidth){
                mapWidth = this.props.config.mapWidth;
            }
        }
        outputDIV = <span> {val} </span>;
        //identify the type of geo shape
        if (val.indexOf('POLYGON') !== -1 || val.indexOf('Polygon') !== -1 || val.indexOf('MULTIPOLYGON') !== -1 || val.indexOf('MultiPolygon') !== -1 || val.indexOf('LineString') !== -1 || val.indexOf('MultiLineString') !== -1) {
            let wkt = new Wkt.Wkt();
            wkt.read(val);
            if(wkt.components &amp;&amp; wkt.components.length &amp;&amp; wkt.components[0].length){
                zoomLevel = 7;
                if(this.props.config &amp;&amp; this.props.config.zoomLevel){
                    zoomLevel = this.props.config.zoomLevel;
                }
                if(this.props.zoomLevel){
                    zoomLevel = this.props.zoomLevel;
                }
                if(this.props.config){
                    if( this.props.config.simplifyPolyLines){
                        simplifyPolyLines = this.props.config.simplifyPolyLines;
                    }
                    if( this.props.config.simplifyTolerance){
                        simplifyTolerance = this.props.config.simplifyTolerance;
                    }

wicket

A modest library for moving between Well-Known Text (WKT) and various framework geometries

GPL-3.0
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis

Popular wicket functions