shapefile icon indicating copy to clipboard operation
shapefile copied to clipboard

cannot get FID column

Open ruoxianss opened this issue 7 months ago • 0 comments

shapefile .open(vectorUrl + '.shp?r=' + r, vectorUrl + '.dbf?r=' + r, { encoding: 'utf-8' }) //这里防止乱码,可以用encoding来指定文件的编码。 .then((source) => source.read().then(function log(result) { if (result.done) { vectorLayer.setSource(vectorSource);

        return;
      }
     // result.value don't hava FID column 
      let feature = geoJsonFormat.readFeature(result.value);

      vectorSource.addFeature(feature);
      return source.read().then(log);
    }),
  )
  .catch((error) => console.error(error.stack));

ruoxianss avatar Jul 17 '24 07:07 ruoxianss