In order to display maps in your application, you should include the charts base project, as it was described for the chart display subsystem. Additionally, you should define the following application properties for the Web Client block:
-
Mandatory parameter – map service API access key. For a free key use the
cuba.charts.map.freeApiKey
property. For a commercial license, the following properties should be defined:-
cuba.charts.map.useBusinessApiKey = true
- commercial key flag. -
cuba.charts.map.businessApiKey
- API key. -
cuba.charts.map.clientId
- client identifier, may be mandatory depending on the map service provider. Mandatory for Google Maps.
-
-
Optional parameters:
-
cuba.charts.map.defaultZoom
- default zoom level for the map. -
cuba.charts.map.defaultLatitude
- default latitude of the map center point. -
cuba.charts.map.defaultLongitude
- default longitude of the map center point. -
cuba.charts.map.provider
- map service provider,google
by default.
-
Example of a web-app.properties
file:
cuba.charts.map.freeApiKey = my_key cuba.charts.map.defaultZoom = 13.0 cuba.charts.map.defaultLatitude = 51.5001 cuba.charts.map.defaultLongitude = -0.1262