Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

122
Views
Leaflet List marker shapefile

Salutations, I'm working with a shapefile with the leaflet library. I would need to retrieve the list of markers from the shapefile, for example by retrieving the station code so that I can then search for a point on the map. Below is my code:

var watercolor = L.tileLayer('http://mt0.google.com/vt/lyrs=s&hl=en&x={x}&y={y}&z={z}', {});
var geo = L.geoJson({features: []}, {
        onEachFeature: function popUp(feature, layer) {
            var out = [];
            if (feature.properties) {
                for (var key in feature.properties) {
                    out.push(key + ": " + feature.properties[key]);
                }
                layer.bindPopup(out.join("<br />"));
            }
        }
    });

    var myMap = L.map('divMapID', {
        center: L.latLng(39.15097955985934, 9.019421210403138),//Valori prec: [39, 9],
     `enter code here`   zoom: 10,
        minZoom: 3,

        layers: [watercolor, geo]

    });


    //data è un oggetto geoJson
    var base = 'testo.zip';
    shp(base).then(function (data) {
        geo.addData(data);
    });

    var baseMaps = {
        "BaseLayer": watercolor
    };
    var overlays = {
        "shapefile": geo
    };
    L.control.layers(baseMaps, overlays).addTo(myMap);
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!