Best way to load Javascript into a page

0
I have a requirement to integrate maps using the OpenLayers3 library. Their quick start example is here: https://openlayers.org/en/latest/doc/quickstart.html I've tried putting some of this example into an HTMLSnippet widget on a page but nothing is happening. I've checked the Network tab in Internet Explorer and it doesn't look like the open layers javascript is even being imported in. Does anyone have an example they can share where they have successfully integrated a third party javascript library into their app? EDIT So I've followed both the expert webinars on custom widget creation and am starting to put something together. I'm hitting a problem; here's my widget so far: require(     {         packages:[             {name: "openlayers", location: "http://openlayers.org/api/OpenLayers.js"}         ]     },     ["BlankWidget/widget/BlankWidget", "dojo/ready", "dojox/geo/openlayers/Map"], function(ready, Map){         ready(function(){             map = new Map("map");             map.fitTo([-160,70,160,-70]);         });     }); When I run the app with the widget in I'm getting a 404 error from mxui.js; the src is "dojoLoader" and the message is "xhrfailed". Anyone have any insight?
asked
2 answers
0

Creating a custom widget is the way to go.

answered
0

Did you take a look at the leaflet app (https://appstore.home.mendix.com/link/app/2696/Mendix/Leaflet-Maps)

Because may be I am wrong here but I thought they used the same map source.

Regards,

Ronald

 

answered