Giter Site home page Giter Site logo

ol-react's People

Contributors

brian32768 avatar bwilsoncc avatar isti115 avatar nickspacek avatar ntamas avatar richardhills avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

map2u asepkh

ol-react's Issues

BingMaps

BingMaps don't show up for me, I created an apiKey and made sure it's getting passed to OL5.
I don't use BingMaps so I am not too worried about it today.

vectorSource not working for layer.Vector

I would like to add a geojson vector source to the component "layer.Vector".
I started to make a really simple example:

       var style = {
            image: {
                type: 'circle',
                radius: 4,
                fill: { color: [100,100,100, 0.5] },
                stroke: { color: 'green', width: 1 }
            }
        }
        var point = new Point(
            transform([-1.49, 49], 'EPSG:4326', 'EPSG:3857')
        );
        var pointFeature = new Feature(point);
        var vectorSource = new VectorSource({
            projection: 'EPSG:4326'
        });
        vectorSource.addFeatures([pointFeature]);

        return (
            <div className="container">
                <Map view={<View resolution={10000} center={[0, 0]}/>}>
                    <layer.Tile source="OSM"/>
                    <layer.Vector name="Display" source={vectorSource} style={style}/>
                </Map>
            </div>
        );

But I get only the OSM TileLayer, there no "Point" and I get also an error:
GET http://localhost:8000/undefined0/query/?f=json&returnGeometry=true&spatialRel=esriSpatialRelIntersects&geometry=%7B%22xmin%22%3A-10018754.171394622%2C%22ymin%22%3A-5009377.085697312%2C%22xmax%22%3A-5009377.085697311%2C%22ymax%22%3A-9.313225746154785e-10&geometryType=esriGeometryEnvelope&outFields=*&callback=__jp0 net::ERR_ABORTED 404 (Not Found)

Is there any solution to display a geojson with the layer.Vector component ?

layerCollection not defined

I really like what where you are going with this and would love to make it work for my project. I tried building with ol5 (I need to use ol5) but keep running into an issue where CollectionContext is failing.

The specific error I have been getting is:
Uncaught TypeError: Cannot read property 'push' of undefined at tile.js:12 at commitHookEffectList (react-dom.development.js:19986) at commitPassiveHookEffects (react-dom.development.js:20016) at HTMLUnknownElement.callCallback (react-dom.development.js:347)and at Object.invokeGuardedCallbackDev (react-dom.development.js:397) at invokeGuardedCallback (react-dom.development.js:454) at flushPassiveEffectsImpl (react-dom.development.js:22868) at unstable_runWithPriority (scheduler.development.js:643) at runWithPriority$2 (react-dom.development.js:11305) at flushPassiveEffects (react-dom.development.js:22841)

undefinined in this case referring to layerCollection from
const layerCollection = useContext(CollectionContext);
in the Tile component. I dont think this has anything to do with ol5. Not sure what is going on there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.