To continue with this content, please log in with your Data Access ID or create a new account.
Cancel Data Access ID
You may not be authorized to see this content. Please contact Data Access Europe for more information.
Cancel Data Access Europe
You are not authorized to see this content.
Cancel Data Access Europe
Next lesson:

Custom Controls

Lesson 10: JavaScript Libraries

Using the previously demonstrated techniques it is possible to wrap the DataFlex framework around the logic in existing JavaScript libraries. This allows you to quickly build a custom control without having to build the logic that is inside the libraries. Shown is a web application that demonstrates a Google Maps control. It takes data, in the form of coordinates, from the server, and renders a map from the coordinates.

Clicking the ‘Init map’ button load up a Google maps control that has been wrapped in the DataFlex framework.

To show how this is done:

  1. Inside index.html a reference to the JavaScript library has been added, and a wrapper was then created.
  2. The WebGoogleMaps.js contains a lot of logic similar to the previous demonstrations. 
  3. Something unique to note is the initMap function that forwards the call to the Google Maps JavaScript library.