Leaflet / Leaflet/Leaflet.VectorGrid

TypeError: Cannot read property 'extend' of undefined

Open
#201 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
676
Forks
202
PR merge metrics
No merged PRs in 30d

Description

I am using aurelia framework. Earlier i was using Leaflet Mapbox Tile layer library to display vector tiles but now i want to use a seperate tile server to render vector tiles. For this i planned to use Leaflet VectorGrid library. I installed the package using "jspm install github:Leaflet/Leaflet.VectorGrid" and also installed leaflet 1.0.0 version. I am importing this like import 'Leaflet/Leaflet.VectorGrid';
But when i am trying to call vectorGrid.protobuf i am getting error as "Cannot read property 'protobuf' of undefined".Seems vectorGrid instance is not being created.See the screenshot.
image

My import sequence is :

import * as D from "leaflet-draw";
import * as L from "leaflet";
import 'Leaflet/Leaflet.VectorGrid';

Code line :
L.vectorGrid.protobuf(mapboxUrl, mapboxVectorTileOptions);

Please help me where i am doing wrong ?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Aurelia/JSPM setup using the shown import sequence for leaflet, leaflet-draw, and Leaflet.VectorGrid. Check the Leaflet.VectorGrid entry point and the L.vectorGrid.protobuf call to determine why vectorGrid is undefined; the issue is done when that call is available and no longer raises the TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.