Skip to content

cannot get FID column #74

@ruoxianss

Description

@ruoxianss

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));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions