Adding a Map to a Window Container

Description

Create a dropdown window container with a map. This requires acquiring a Google Map API key from Google.

images/am20.png
A map inside a dropdown window container.

A Window Container with a Map

  1. In the UX Builder on the UX Controls open the 'Data Controls' section. Click on the [Map] option to add a Map Control to the component.

    images/am2.png
  2. Highlight the map control in the controls tree. In the properties list on the right scroll down to the 'Map Properties'. Check the 'Fill container' checkbox, even though a window container has yet to be defined.

    images/am3.png
  3. Next to the Google Maps API key property place the API key that you received from Google's developers website. This key can also be added to the [Project Properties], in which case it will not be necessary to define it here.

    images/am4.png
  4. With the map control highlighted open the 'Containers' menu and click on the [Container] option.

    images/am5.png
  5. In the Container Type list select the 'Window' option. Click the 'Insert Around' button.

    images/am6.png
  6. Highlight the opening window container tag. In the properties list on the right click the [...] button next to the 'Window properties' property in the 'Window Properties' section.

    images/am7.png
  7. In the 'Window Container' dialog set the 'Window type' property to 'Dropdown'.

    images/am8.png
  8. Click the [...] button next the 'Dropdown Window position' property and select the 'Relative' radio button option. Click OK and return to the 'Window Container' dialog.

    images/am9.png
  9. Uncheck the 'Window title show' checkbox.

    images/am10.png
  10. Set the 'Window height' and 'Window width' properties to '3in'.

    images/am11.png
  11. Uncheck the 'Window is resizable' checkbox.

    images/am12.png
  12. Check the 'Has pointer icon' checkbox. Click OK to close the Window Container dialog.

    images/am13.png
  13. Highlight the window end tag, [Window End:WINDOW_1]. Open the 'Other Controls' click on the [Button] option to add a button control to the component.

    images/am14.png
  14. Highlight the button control. In the properties list on the right set the 'Button text' to read 'Map'.

    images/am15.png
  15. Scroll down to the 'Javascript' section and click on the [...] button next to the 'onClick' property.

    images/am16.png
  16. Set the editing mode to the 'Action Javascript' radio button. Click the 'Add New Action' button.

    images/am17.png
  17. Type 'show' into the 'Filter list' control and select the 'Show Container Window' option. Click OK.

    images/am18.png
  18. In the 'Display Window' dialog set the 'Container ID' property to be 'WINDOW_1'. Click OK, OK, and click 'Save'.

    images/am19.png
  19. Run the component in Live Preview. Click the 'Map' button, the map should be displayed.

    images/am20.png

See Also