Giter Site home page Giter Site logo

leaflet.wfs-t's People

Contributors

paulkamer avatar stuporglue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leaflet.wfs-t's Issues

GML reader

I read in the description that it should implement a GML reader, since WFS-T is a GML oriented protocol.

Are there any plans to for this implementation any time soon ?

Problem adding marker - no geometry field

Hi Michael

I loaded a very simple point layer into my leaflet page with your plugin and leaflet draw all running fine with both markers showing.

When try and add a marker to the map I get: "no geometry field" error in the console.

Here's my code for the page.

Matt

'

    <script type="text/javascript" src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>
    <script type="text/javascript" src="http://localhost/leaflet/leaflet/Leaflet.draw/dist/leaflet.draw.js"></script>
    <script type="text/javascript" src="http://localhost/leaflet.wfs-t/js/leaflet.gml.js"></script>
    <script type="text/javascript" src="http://localhost/leaflet.wfs-t/js/leaflet.wfst.js"></script>
    <script type="text/javascript" src="js/map.js"></script>



</head>
    <body>
        <div id="map"></div>
    <script type="text/javascript">
        // Load the map with the initMap function in map.js

        var map = L.map('map').setView([50.370, -4.14], 14);

        var basemap = L.tileLayer('http://{s}.tile.cloudmade.com/a8ed148d84c2438ba62c2742cac051ae/33356/256/{z}/{x}/{y}.png', {
        maxZoom: 18,
        attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://cloudmade.com">CloudMade</a>'
    }).addTo(map);


layers = {};


layers.drawnItems = L.wfst(null,{
url : 'http://localhost/geoserver/wfs',
featureNS : 'cite',
featureType : 'points',
primaryKeyField: 'gid',
}).addTo(map);

    var drawControl = new L.Control.Draw({
    edit: {
    featureGroup: layers.drawnItems
}
});
map.addControl(drawControl);

map.on('draw:created', function (e) {
layers.drawnItems.addLayer(e.layer);
});
map.on('draw:edited', function (e) {
layers.drawnItems.wfstSave(e.layers);
});

featureNS is a misleading name

featureNS is used, but the expected value is the featurePrefix

i.e. normally I would configure:

    layers.drawnItems = L.wfst(null,{
        // Required
        url : '/geoserver/opengeo/wfs',
        featureNS : 'http://opengeo.org',
        featureType : 'countries',
        primaryKeyField: 'id'
    }).addTo(map);

but this is what works (featurePrefix instead of featureNS):

    layers.drawnItems = L.wfst(null,{
        // Required
        url : '/geoserver/opengeo/wfs',
        featureNS : 'opengeo',
        featureType : 'countries',
        primaryKeyField: 'id'
    }).addTo(map);

CORS issue using different local ports

Just tried on a local geoserver instance and I get this CORS issue. Using such address with WMS TileLayers works without problems:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8080/geoserver/wfs?. This can be fixed by moving the resource to the same domain or enabling CORS.

Since the web content is on port 80, I need to specify the full address. Which seem to work fine with other layers. Any idea ho to solve or circumvent this issue at the plugin level (i.e. without enabling CORS?).

Request fails and I get the message at line 109 & 110 of current dist as output.

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.