Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subsequent request fails #21

Open
scottydelta opened this issue Aug 16, 2016 · 0 comments
Open

Subsequent request fails #21

scottydelta opened this issue Aug 16, 2016 · 0 comments

Comments

@scottydelta
Copy link

    var pnt =  {
        radius: 3,
        fillColor: "#009688",
        color: "#000",
        weight: 1,
        opacity: 1,
        fillOpacity: 0.8
    };
    var area =  {
        weight: 2,
        color: "#999",
        opacity: 1,
        fillColor: "#B0DE5C",
        fillOpacity: 0.5
    };
    parser = L.geoJson([], {
        style: function (feature) {
            return feature.properties && area;
        }
    }).addTo(map);
    var starttime = +new Date;
    shapefile = new Shapefile({
        shp: "/data/1.shp",
        dbf: "/data/1.dbf"
    }, function(data){
        features = parser.addData(data.geojson);
        console.log("took",new Date - starttime,"milliseconds")
    })
    parser1 = L.geoJson([], {
        pointToLayer: function (feature, latlng) {
            return L.circleMarker(latlng, pnt);
        }
    }).addTo(map);
    var starttime1 = +new Date;
    shapefile1 = new Shapefile({
        shp: "/data/2.shp",
        dbf: "/data/2.dbf"
    }, function(data){
        features1 = parser1.addData(data.geojson);
        console.log("took",new Date - starttime1,"milliseconds")
    })

when using the above code, only shapefile1 is visible and there is no error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant