Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 358
Registered: ‎04-13-2013
My Device: Z10
My Carrier: Telus
Accepted Solution

10.2.1 Mapview issue

[ Edited ]

Hi,

I currently have Z10STL100-3/10.2.1.1055 installed on my phone and noticed the map view function of my app doesn't show the bulls eye marker any more and the map keeps zooming out then zooming back in. None of this happened before. I also tested the map view sample app, upon which my map view is based, and it faces the same issues.

Any clue what the issue could be? Or is it just because I have a leak? I wasn't aware of any major changes to the map functions in 10.2.1 as far As I've read.

 

Here is my CPP code:

 

QObject* mapViewAsQObject = root->findChild<QObject*>(QString("mapViewObj"));
        if (mapViewAsQObject) {
            mapView = qobject_cast<bb::cascades::maps::MapView*>(mapViewAsQObject);
            mapView->setCaptionGoButtonVisible(true);
            if (mapView) {
                // creating a data provider just for the device location object. that way, when the clear function is call, this object is not removed.
                DataProvider* deviceLocDataProv = new DataProvider("device-location-data-provider");
                mapView->mapData()->addProvider(deviceLocDataProv);

                // create a geolocation just for the device's location
                deviceLocation = new GeoLocation("device-location-id");

                // for that location, replace the standard default pin with the provided bulls eye asset
                Marker bullseye = Marker(UIToolkitSupport::absolutePathFromUrl(
                                    QUrl("asset:///images/me.png")), QSize(60, 60),
                                    QPoint(29, 29), QPoint(29, 1));
                deviceLocation->setMarker(bullseye);

                deviceLocDataProv->add(deviceLocation);
            }
        }

 and here is the QML code:

 

MapView {
            touchPropagationMode: TouchPropagationMode.None
            id: mapview
            objectName: "mapViewObj"
            altitude: 3000
            preferredWidth: 768
            preferredHeight: 1280
            
            onLatitudeChanged: {
                lat.setText(qsTr("%1").arg(newLat));
            }
            onLongitudeChanged: {
                lon.setText(qsTr("%1").arg(newLon));
            }
            
            attachedObjects: [
                Invocation {
                    id: invokeSettings
                    query {
                        invokeTargetId: "sys.settings"
                        invokeActionId: "bb.action.OPEN"
                    }
                }
            ]
        }

 



Thanks in advance any and all help will be liked and solutions marked.

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: 10.2.1 Mapview issue

I wouldn't trust the leaked builds for debugging try the dev build (or the simulator) instead and see if the problem persists.

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 358
Registered: ‎04-13-2013
My Device: Z10
My Carrier: Telus

Re: 10.2.1 Mapview issue

Fair enough. I guess I'll wait till I get my hands on a windows PC (Since I don't have a dual booted Mac) again to load a Dev build on my Dev alpha device. Cheers.
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: 10.2.1 Mapview issue

[ Edited ]

My new app uses MapView and I'm running the new leak I've just tried it with no problems.

I don't use the Marker though.

 

I will download and try the sample and see if it acts in a strange way, is there anything in particular that sets it off?

 

[Edit] YOu can try the Simulator on a Mac though can't you?


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 358
Registered: ‎04-13-2013
My Device: Z10
My Carrier: Telus

Re: 10.2.1 Mapview issue

Thanks, appreciate it. Overall everything works fine, the only thing is just the Bulls eye marker is non-existant and the map keeps zooming out and in, even though my QML specifies a certain altitude for the Mapview.
Developer
Posts: 358
Registered: ‎04-13-2013
My Device: Z10
My Carrier: Telus

Re: 10.2.1 Mapview issue

[ Edited ]

As for the Simulator, I cannot, because the simulator requires me to have windows installed on my macbook and use VMware fusion to run the simulator on the windows side. I usually just use the physical dev devices I have to overcome this unfortunately.

 

edit: looks like they may have a beta mac simulator Now, awesome.

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: 10.2.1 Mapview issue

[ Edited ]

Okay, I didn't know that about the Mac, I was under the impression you could run VMWare natively.

 

I downloaded, built and run the MapView example all works fine for me on a Z10 LE running 10.2.1.1055.

 

The map is rock solid (showing Cambridge, UK), multiple pins dropped and removed with no problems.

 

[Edit] Are you building to 10.2? FYI, I did.


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 358
Registered: ‎04-13-2013
My Device: Z10
My Carrier: Telus

Re: 10.2.1 Mapview issue

Hmm strange, I'm building to 10.1 Global and 10.2. This worked for OS 10.2. Is your LE on the leak? or is that the Dev os?

thanks again
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: 10.2.1 Mapview issue

It's the leaked one, are you saying it exhibits this behaviour on all builds?

I will try building MapView to 10.1.


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 358
Registered: ‎04-13-2013
My Device: Z10
My Carrier: Telus

Re: 10.2.1 Mapview issue

Could you try downloading PinGuin from BB World (It's free) and see if it works on your device?