Reputation: 175
i want to create a custom visual map on power-bi by using openstreetmap.
Therefore i created a new visual project as : pbiviz new LeafletCustomVisual
after that i install osm as : npm install osm --save
and edited pbiviz.json
as
"externalJS": [
"node_modules/osm/index.js"
],
also i checked out https://www.npmjs.com/package/osm page and tried on visual.ts
as:
import osm from 'osm';
export class Visual implements IVisual {
private map: osm;
constructor(options: VisualConstructorOptions) {
this.target = options.element;
this.map = osm().position(47.88038, 10.6222475);
this.target.appendChild(this.map.show());
}
}
but i just didnt work.i am not familiar with node.js and related stuff
Upvotes: 3
Views: 2515