[Qt-qml] MapPolyline
david.laing at nokia.com
david.laing at nokia.com
Fri Nov 12 00:31:08 CET 2010
Hi Sampo,
Dynamic adding / removing of map objects or coordinates in polygons / polylines is currently quite a painful exercise.
The present QML bindings for the Maps and Navigation API aren't final though, and that's something we're hoping to address pretty shortly.
There is already some interest in this on the qt-mobility-feedback list, so I'll probably post something there when the bindings are finished and available from the public git repository.
Cheers,
Dave
> -----Original Message-----
> From: ext Sampo Savola [mailto:samposav at mail.student.oulu.fi]
> Sent: Thursday, 11 November 2010 9:53 PM
> To: Laing David (Nokia-MS/Brisbane)
> Cc: Jones Martin (Nokia-MS-Qt/Brisbane); qt-qml at trolltech.com
> Subject: RE: [Qt-qml] MapPolyline
>
> Hi,
> Thanx for the reply
>
> I got it to work, the reason was that Qt mobility 1.1 wasn't properly
> installed on my system.
>
> I can now draw a MapPolyline from list of coordinates, however i want
> to draw the route on the map on the fly always when i get
> onPositionChanged from PositionSource (gps).
>
> What is the proper way to add this new Coordinate to MapPolyline
> dynamically on the fly and update the route on the map?
>
> I would be more than happy if someone could provide me an example :)
>
>
> //Sampo
> Quoting david.laing at nokia.com:
>
> > Hi,
> >
> > I just tried out both of the following and didn't have any problems:
> >
> > ---------------------------
> >
> > import Qt 4.7
> > import QtMobility.location 1.1
> >
> > Item {
> > width: 500
> > height: 500
> >
> > focus : true
> >
> > Map {
> > id: map
> > plugin : Plugin {
> > name : "nokia"
> > }
> > size.width: parent.width
> > size.height: parent.height
> > zoomLevel: 7
> > center: Coordinate {
> > latitude: -27
> > longitude: 153
> > }
> >
> > MapPolyline {
> > Coordinate {
> > latitude: -27
> > longitude: 153
> > }
> > Coordinate {
> > latitude: -27.1
> > longitude: 153
> > }
> > Coordinate {
> > latitude: -27.1
> > longitude: 153.1
> > }
> > Coordinate {
> > latitude: -27
> > longitude: 153.1
> > }
> > }
> > }
> > }
> >
> > ---------------------------
> >
> > import Qt 4.7
> > import QtMobility.location 1.1
> >
> > Item {
> > width: 500
> > height: 500
> >
> > focus : true
> >
> > Map {
> > id: map
> > plugin : Plugin {
> > name : "nokia"
> > }
> > size.width: parent.width
> > size.height: parent.height
> > zoomLevel: 7
> > center: Coordinate {
> > latitude: -27
> > longitude: 153
> > }
> >
> > MapPolyline {
> > path: [
> > Coordinate {
> > latitude: -27
> > longitude: 153
> > },
> > Coordinate {
> > latitude: -27.1
> > longitude: 153
> > },
> > Coordinate {
> > latitude: -27.1
> > longitude: 153.1
> > },
> > Coordinate {
> > latitude: -27
> > longitude: 153.1
> > }
> > ]
> > }
> > }
> > }
> >
> > ---------------------------
> >
> > Could you provide a snippet of code showing what you're trying to do?
> >
> > Cheers,
> >
> > Dave
> >
> >> -----Original Message-----
> >> From: qt-qml-bounces at trolltech.com [mailto:qt-qml-
> >> bounces at trolltech.com] On Behalf Of Jones Martin (Nokia-MS-
> Qt/Brisbane)
> >> Sent: Thursday, 11 November 2010 2:30 PM
> >> To: samposav at mail.student.oulu.fi; qt-qml at trolltech.com
> >> Subject: Re: [Qt-qml] MapPolyline
> >>
> >> Hi Sampo,
> >>
> >> This sounds like a bug to me, so I suggest logging a bug on
> >> http://bugreports.qt.nokia.com
> >>
> >> You may get more help on the qt-mobility-feedback at trolltech.com
> mailing
> >> list.
> >>
> >> Martin.
> >>
> >> > -----Original Message-----
> >> > From: qt-qml-bounces at trolltech.com [mailto:qt-qml-
> >> bounces at trolltech.com] On
> >> > Behalf Of ext Sampo Juhani Savola
> >> > Sent: Wednesday, 10 November 2010 11:33 PM
> >> > To: qt-qml at trolltech.com
> >> > Subject: [Qt-qml] MapPolyline
> >> >
> >> >
> >> > Hello
> >> >
> >> > I would like to draw a route on the Map with QML by using
> MapPolyline
> >> > in Qt Mobility 1.1.
> >> >
> >> > Should this MapPolyline work with this release? I can use the Map
> >> > object fine but when i try to add MapPolyline the code stops
> working
> >> > and i get error: "MapPolyline is not a type"
> >> >
> >> >
> >> > Thanx
> >> >
> >> > Sampo
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > Qt-qml mailing list
> >> > Qt-qml at trolltech.com
> >> > http://lists.trolltech.com/mailman/listinfo/qt-qml
> >>
> >> _______________________________________________
> >> Qt-qml mailing list
> >> Qt-qml at trolltech.com
> >> http://lists.trolltech.com/mailman/listinfo/qt-qml
> >
>
>
More information about the Qt-qml
mailing list