Skip to content
This repository was archived by the owner on Nov 6, 2019. It is now read-only.
This repository was archived by the owner on Nov 6, 2019. It is now read-only.

Uncaught Error createLeafletElement() must be implemented and slow performance #2

@corganfuzz

Description

@corganfuzz

Solved this error by adding, the following inside the example folder:

on src/Shapefile.js

Right after the ComponentWillMount () (right about line 11) , do:

ShapeFile.prototype.createLeafletElement = function createLeafletElement () {}

Now, I've tried to add the following file block.zip, which can be found here https://www.data.boem.gov/Main/Mapping.aspx: (4th element on table) which has around 10.000 features (about 4.6MB)

But the map performs really slow, when the layer is on. I suspect this is because I'm trying to move ALL features at the same time, so map and feature layers move together. Slowness goes away when layer is deselected.

Any Idea how could I make it faster ?

package.json

  "peerDependencies": {
    "catiline": "2.9.3",
    "leaflet": "^1.2.0",
    "prop-types": "^15.5.10",
    "react": "^15.6.1",
    "react-leaflet": "^1.7.1",
    "shpjs": "^3.3.2"
  },
  "devDependencies": {
    "babel-cli": "^6.8.0",
    "babel-core": "^6.8.0",
    "babel-eslint": "^8.0.3",
    "babel-loader": "^6.2.4",
    "babel-preset-es2015": "^6.6.0",
    "babel-preset-react": "^6.0.15",
    "babel-preset-stage-0": "^6.1.18",
    "catiline": "2.9.3",
    "eslint": "^4.12.1",
    "eslint-plugin-react": "^7.5.1",
    "jquery": "*",
    "leaflet": "^1.2.0",
    "prop-types": "^15.5.10",
    "react": "^15.6.1",
    "react-dom": "^15.6.1",
    "react-leaflet": "^1.7.1",
    "requirejs": "^2.3.2",
    "shpjs": "^3.3.2",
    "webpack": "^1.13.0",
    "webpack-dev-server": "^1.12.1"

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