cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Load Bing Map in PCF control

I am working on PCF control where we have added a Bing Map control in which we are using Bing Maps library. Currently, we are copying the code from Bing Maps library link: https://www.bing.com/api/maps/mapcontrol into our PCF.Bingmaps.js file and then we are importing it in our typescript code using import statement, but we are having an issue doing it this way. Is there any other way of using the Bing library tag like we normally do in HTML file.

3 REPLIES 3
Highlighted
Skilled Sharer
Skilled Sharer

Re: Load Bing Map in PCF control

I don't know what kind of problem you have using the library.

Maybe there is possible to use an npm Package for the bing maps?

In case that doesn't work for you and you have to import an old school js library,  you could try using

import "./pathToMapControl/mapControl.js";

after you downloaded the library in your project.

There is a similar issue, in case it helps: https://powerusers.microsoft.com/t5/PowerApps-component-framework/Issue-Using-external-javascript-fi...

Best regards,

Diana

Highlighted
Anonymous
Not applicable

Re: Load Bing Map in PCF control

We tried with import './path/file.js' but the control is not working in internet explorer as import of js is not supported in Intenet explorer and for bing map, there is only declaration file available.

In other browser we are only facing issue in bingmap js it is loading completely while other js are working properly

Highlighted
Skilled Sharer
Skilled Sharer

Re: Load Bing Map in PCF control

As far as I could evaluate, the typescript files are transpiled to JavaScript ES5 . So the issue is not that the IE doesn't know "import", because actually the the file you are importing is packed inside your "bundle.js" located in your "out" folder.

But, it seems to me that the files imported like import "yourfile" are not transpiled

import {getProposals} from "./data/Requests"; //this will be transpiled
import "./Core/Dummy.js"; //this is not transpiled

So in case Bing Maps doesn't have an npm package, maybe you can transpile the file yourself to ES5 before including it in the project, in order to have it working in IE. 

 

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (8,725)