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
Contributor
Posts: 34
Registered: ‎05-02-2013
My Device: 9700
My Carrier: Idea

BB 10 cascades maps

I have been looking at the samples for BB10 maps but I am just not really understanding it. Does anyone have a link or a basic tutorial how I can get a default map to display on the device. Nothing fancy, just a simple map or a link to "bb 10 maps" for dummies or something.

I would like to invoke a simple map using. So i found a simple mapview that looks like it will work. However, after playing around i don't think my ide like the import line for the maps. If i take everything off the page and just put a label and comment out the import line, the page displays with just a label, once i add the import line, it doesn't work. The page won't display.

 

so for example. in my maps.qml page, if i export comment out the mapview and the mapview container then the page will display. If i uncomment them it doesn't display.

 

import bb.cascades 1.0
//    import bb.cascades.mapview 1.0

Page {
id: root
Container {
    layout: DockLayout {
    }
    ActivityIndicator {
        verticalAlignment: VerticalAlignment.Fill
        horizontalAlignment: HorizontalAlignment.Fill
    }
    Label {
        text: qsTr("This is where the lable is")
        textStyle.base: SystemDefaults.TextStyles.BigText
        verticalAlignment: VerticalAlignment.Center
        horizontalAlignment: HorizontalAlignment.Center
    }
    /*
    MapView {
        id: myMap
        longitude: -79.4042
        latitude: 43.6481
        altitude: 1800.0
        horizontalAlignment: HorizontalAlignment.Fill
        onCreationCompleted: {
            myMap.setRenderEngine("RenderEngine3D")
        }
    }*/
}

 

Interesting enough, within my map.qml file it, when i go to the design view it says:
"problem leading qml file: 2:1 module "bb.cascades.mapview" is not installed"

Developer
Posts: 16,997
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: BB 10 cascades maps

please note that you are posting in the bb java forum.

the qml preview does not work with custom modules. i usually have a temp.qml where i copy my UI code only to check the looks.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter