You can add the pxAddressMap control to a cell, enabling users to view and interact with location points in Google Maps from within a desktop or mobile application. This control is responsive when added to a dynamic layout, and you can configure events on the control, such as displaying location details. It can also be added to a smart layout or to a section. Refer to Using an Address Map control for further information.
Map points are generated using data sourced from a Property, Data page, Clipboard page, or Report definition. Information for a specific location is shown in a popup when the corresponding map point is clicked or tapped. If you experience issues using the Geolocation functionality, see Troubleshooting Show User Location feature in browsers.
Note: The Address Map control uses the Google Maps service when displaying locations and corresponding information. Refer to the Google Terms of Service for details regarding any region-based or usage restrictions.
The Address Map control only displays at runtime if you have first obtained a Google API key.
uiengine/map/googleapikey
.Note: The above steps partially apply to a third-party resource (the Google Developer Console) and are accurate as of the publication of this article. Refer to the official Google Developer documentation for Obtaining an API Key for additional assistance with this process.
In the Cell Properties window, the General tab displays various settings for how the map is displayed.
Field |
Description |
Show User Location |
When checked, shows the user's current location on the map with a blue marker pin. This pin is prioritized and displays even if the Starting Lat, Long field also contains any values. |
Starting Lat, Long |
A point without a pin that is generated by Google Maps as a starting point when mapping a location.
|
Visibility | Select the conditions for whether the map displays based on user input. |
Type |
A menu in the Markers Source section where you select the data source used to display points on the map. See the section below for description of fields for each available option. |
For list-based sources, data in the Marker info section field runs in the current pin’s context. Additionally, the Applies to
class of the Marker info section field must be the same for each record displayed as a pin on the map.
The Type menu in the Markers Source section defaults to "None", but you can select one of the following options from the list:
Option |
Description |
||||||||||||||||
Property | |||||||||||||||||
If selected, you can also specify the Source to be Value or List defined on property. Specifying the Address property is required and you can optionally also specify the Marker info section. The following fields are available:
|
|||||||||||||||||
Data page | |||||||||||||||||
If selected, you must also specify the Data page (required).
|
|||||||||||||||||
Clipboard page | |||||||||||||||||
If selected, you must also specify the Clipboard page (required).
|
|||||||||||||||||
Report definition | |||||||||||||||||
If selected, you must also specify the Applies to and Report definition (both required fields).
When the Address Map control is sourced from a report definition it can use a value to drive which marker icon to display - so that different locations on the control have different icons. See also Customizing map icons section below. |
For instance, if a Text Input control is bound with the Address property and the map also drives its marker from the same property, then:
The Address Map control automatically, via changing tracking, updates the marker pin to display this new location without needing to perform a section refresh. In addition, if the Allow marker repositioning to change address value option is selected, any change in the marker pin by dragging it, triggers an update in the Text Input field automatically without any section refresh.
In the Cell Properties window, the Presentation tab allows you to select a radio button that sets the height of the map either automatically or with a custom setting. The custom setting (as shown selected below) provides a text field to input a number, along with a menu to select px, em, or %.
Note: The % height setting is not supported in dynamic layouts since they do not have any height configured. % height can only be used with a free form layout.
A user can customize the Address Map control icons to make them consistent with the look and feel of the application and the map. Changing them affects marker icons globally. At design-time a user can also change default marker icons on individual address map instances. For example, it may be useful to show an airport location with an airplane icon and a coffee shop location with a cup icon on the same map displayed in the application.
Note: The user can only customize the images representing the icons, the anchor position cannot be changed.
Name |
Description |
Required size |
pyDefaultMarkerIcon | Icon for address location marker pins. By default it is red. | 32 x 32 pixels |
pyGPSIcon | Icon for button that resets the map to user's current location. | 32 x 32 pixels |
pyUserLocationIcon | Icon used to show current physical location. By default it is blue. | 24 x 24 pixels |