Map UI component is not displayed in Cuba Platform

Viewed 309

I use CUBA Platform version 6.0.8 and trying to add map viewer component to the screen, but it's not shown. Screen descriptor is listed below:

<window xmlns="http://schemas.haulmont.com/cuba/window.xsd";
        caption="msg://browseCaption"
        class="com.mycompany.gui.mapsample.MapScreen"
        focusComponent="mapBox"            
        xmlns:chart="http://schemas.haulmont.com/charts/charts.xsd">
    <layout margin="true" spacing="true">
        <vbox id="mapBox">
            <chart:mapViewer id="map" height="100%" width="100%"
                             mapType="satellite"/>
        </vbox>
    </layout>
</window>

I followed this step. These are map properties:

cuba.charts.map.freeApiKey = ********************************
cuba.charts.map.clientId =  ********************************   
cuba.charts.map.defaultZoom = 13.0
cuba.charts.map.defaultLatitude = 51.5001
cuba.charts.map.defaultLongitude = -0.1262

and here's the controller:

public class MapScreen extends AbstractLookup {

    @Inject
    private MapViewer map;

    @Override
    public void init(Map<String, Object> params) {
        GeoPoint center = map.createGeoPoint(53.490905, -2.249558);
        map.setCenter(center);

What can be the problem or at least where should I start debug it?

1 Answers
Related