MapView does not show pines

I experience MapView and I need help with it. I use 10.3.2 API and testing my application on the Simulator.

Here is my code:

MyMapData.h:

#ifndef MYMAPDATA_H
#define MYMAPDATA_H

#include 

#include 

using namespace bb::cascades::maps;

// MyMapData
class MyMapData
    : public MapData
{
    Q_OBJECT

public:
    explicit MyMapData(QObject *parent = NULL);
    virtual ~MyMapData() {}

public slots:
    void addGeoLocation(const int latitude, const int longitude);
};

#endif // MYMAPDATA_H

MyMapData.cpp:

#include 
#include 

#include 

#include "MyMapData.h"

using namespace bb::platform::geo;

// MyMapData

MyMapData::MyMapData(QObject *parent)
    : MapData(parent)
{
    add(new GeoDeviceLocation());
}

void MyMapData::addGeoLocation(const int latitude, const int longitude)
{
    add(new GeoLocation(latitude, longitude));

    qDebug() << "------------>" << count(true);
}

Inside of main.cpp I register class MyMapData:

qmlRegisterType("bb.cascades", 1, 4, "MyMapData");

Inside the .pro file, I added libs:

LIBS += -lbb -lbbplatform -lQtLocationSubset -lbbcascadesmaps -lGLESv1_CM

Inside the .bar file, I added the following permissions:

access_location_services
access_internet

hand. QML:

import bb.cascades 1.4
import bb.cascades.maps 1.4

Page {
    MapView {
        id: mapView
        latitude: 52.5
        longitude: -98.75

        mapData: MyMapData {
            id: mapData
        }
    }

    actions: [
        ActionItem {
            title: "Drop Pin"
            ActionBar.placement: ActionBarPlacement.OnBar

            onTriggered: {
                mapData.addGeoLocation(mapView.latitude, mapView.longitude);
            }
        }
    ]
}

When I click on Add Pin, no pins on MapView are displayed, but debug of MyMapData :: addGetLocation me, shows that the pine has been added.
What's wrong?

My code works well, just zoom out

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for

  • Satellite A200 - 19K - overheating/fan does not work

    These 2-3 days, my Satellite A200 - 19 k (PSAECE) was himself cut and was not very hot. I installed SpeedFan, but it does detect any fans. In addition, the fan on the base of the machine is not working. Anyone has any ideas for a solution? Any help i

  • All the icons have become icons of word doc and try to open explorer.exe in Word 2010

    All the icons on my new Compaq Presario desktop PC now resemble a page with the logo of the word. When you click on them, they try to open via explorer.exe as a word 2010 document. Any ideas how to undo this?

  • Windows 8/8.1 Weather App is totally wrong 'weather history.

    I live in North Conway, NH and I chose as my position. Bing weather with forecasts Panel seems fairly accurate, as well as the schedule. The cards are regional and are on-site. But the map of historical time is all just ridiculous. It shows the mediu

  • import of 2nd shooter

    Hello, I was the shooter 2nd for a wedding this past weekend. When I got home, I imported my raw images from my sd card in my lightroom and a few days later, when I met the photographer, we tried to download my sd card in his lightroom. They seemed t

  • Error: An unexpected error occurred during automatic creation.

    Hi allAfter that DBA applied the cumulative Financials Patching - 12.1.3 + Recommended Patch Collection 1 (CPR1) and HRMS Suite patch (HR or 6) in a test instance, we encountered ERROR when you attempt to manually a PÒ of automatic creation of an app