Irc-Unix.net

Главная | Actual Topics | Обратная связь | Guest Book | В избранное | Сделать домашней
Категории
 System & Utilities
 Unix News
 OS Emulator
 Developing
 Learning/Education
 Games
 Humour
Каталог статей
Все статьи

Antispam
Статьи
Биллу Гейтсу тоже предлагают избавиться ...
Вымогательство в борьбе со спамом
Календарь

November, 2017
ПнВтСрЧтПтСбВс
12345
6789101112
13141516171819
20212223242526
27282930
Опросы
Какой из этих ОС Вы отдаете большее предпочтение?

QNX
FreeBSD
Linux(any)
Solaris
Mac OS
Windows XP
Windows 2003
Что такое ОС? :)


Результаты
Другие опросы

Всего голосов: 325
Комментарии: 0
Ссылки

Архив Новостей
 November 2017 (7)
 October 2017 (18)
 September 2017 (18)
 August 2017 (13)
 February 2017 (14)
 January 2017 (19)
 December 2016 (16)
 November 2016 (16)
 October 2016 (21)
 September 2016 (18)
 August 2016 (16)
 July 2016 (16)
 June 2016 (20)
 May 2016 (18)
 April 2016 (15)
 March 2016 (22)
 February 2016 (17)
 January 2016 (15)
 December 2015 (15)
 November 2015 (22)
 October 2015 (20)
 September 2015 (17)
 August 2015 (25)
 July 2015 (20)
 June 2015 (23)
 May 2015 (21)
 April 2015 (17)
 March 2015 (19)
 February 2015 (9)
 January 2015 (23)
 December 2014 (9)
 November 2014 (13)
 October 2014 (12)
 September 2014 (18)
 August 2014 (20)
 July 2014 (10)
 June 2014 (12)
 May 2014 (12)
 April 2014 (10)
 March 2014 (22)
 February 2014 (10)
 January 2014 (8)
 December 2013 (26)
 November 2013 (53)
 October 2013 (40)
 September 2013 (48)
 August 2013 (63)
 July 2013 (56)
 June 2013 (52)
 May 2013 (49)
 April 2013 (67)
 March 2013 (74)
 February 2013 (63)
 January 2013 (62)
 December 2012 (62)
 November 2012 (66)
 October 2012 (68)
 September 2012 (48)
 August 2012 (75)
 July 2012 (60)
 June 2012 (71)
 May 2012 (69)
 April 2012 (85)
 March 2012 (86)
 February 2012 (90)
 January 2012 (81)
 December 2011 (103)
 November 2011 (118)
 October 2011 (74)
 September 2011 (2)
 June 2011 (110)
 May 2011 (118)
 April 2011 (111)
 March 2011 (112)
 February 2011 (101)
 January 2011 (119)
 December 2010 (117)
 November 2010 (118)
 October 2010 (131)
 September 2010 (117)
 August 2010 (226)
 July 2010 (351)
 June 2010 (305)
 May 2010 (319)
 April 2010 (343)
 March 2010 (329)
 February 2010 (311)
 January 2010 (312)
 December 2009 (266)
 November 2009 (156)
 July 2009 (101)
 June 2009 (279)
 May 2009 (365)
 April 2009 (348)
 March 2009 (347)
 February 2009 (323)
 January 2009 (318)
 December 2008 (237)
 November 2008 (155)
 October 2008 (334)
 September 2008 (310)
 August 2008 (343)
 July 2008 (362)
 June 2008 (322)
 May 2008 (604)
 April 2008 (1276)
 March 2008 (1658)
 February 2008 (250)
 January 2008 (6)
 November 2007 (1)
 September 2007 (1)
 June 2007 (1)
 May 2007 (1)
 March 2007 (1)
 January 2007 (2)
 December 2006 (1)
 October 2006 (2)
 September 2006 (1)
 August 2006 (2)

QtLocation 5.9

System & Utilities

With Qt 5.9, the QtLocation module has received a substantial amount of new features, as briefly summarized in the release post. The goal of this post is to provide additional details about what’s now possible with QtLocation 5.9.

Rotating and tilting maps

One long-standing limitation of the built-in tile renderer was the inability to draw rotated or tilted maps and map items. We finally removed this limitation, and in 5.9 maps as well as the map items added to them can be rotated and tilted. This also applies to MapQuickItems, which can be tilted by setting the appropriate zoomLevel value to them. With the support for tilting and rotation come two new dedicated gestures in the gesture area of the map: two fingers rotation, and two fingers vertical drag for tilting.

It is now possible to rotate and tilt maps. Items on it will be transformed accordingly. In this figure a MapQuickItem embedding a QtMultimedia Video element is used to overlay a video of the shore.

It is now possible to rotate and tilt maps. Items on it will be transformed accordingly. In this figure a MapQuickItem embedding a QtMultimedia Video element is used to overlay a video of the shore.

In addition to this, a new fieldOfView property has been added to the Map, to control the camera field of view when the map is tilted. Note that this property, like the tilt and the zoomLevel properties, have lower and upper bounds. In some cases these bounds will prevent changing the property (e.g., a plug-in using a third-party renderer that does not allow changing the field of view will return a lower bound for the field of view equal to the upper bound).

Tile overzooming

Another long-standing limitation that got us many complaints over the last years was the inability of using cached data to approximate tile content not yet provisioned.
Lower zoom level tiles are now used to approximate higher zoom levels tiles, until these are fully provisioned. This finally prevents, where possible, the appearance of empty tiles revealing the (usually gray) background.

The difference in loading the map tiles, 5.8 (top) vs 5.9 (bottom)

The difference in loading the map tiles, 5.8 (top) vs 5.9 (bottom)

Improved third party map renderer support and the MapboxGL plugin

Prior to 5.9, the only way to display a map using QtLocation was to cut it into raster tiles, and feed the tiles to the built in tiled map renderer. Some have created plug-ins that embedded third party map renderer, but in the end they all had to do the rasterization-to-tiles step, in order to get the map on the screen.

QtLocation 5.9 removes this roadblock, allowing to draw custom QSG nodes in a custom QGeoMap implementation, so that it is finally possible to plug a third party renderer directly into the QtQuick scene graph.
This can be done in different ways, the most common being rendering the map off-screen into a texture, and then rendering the texture in the QtQuick scene graph, or using a QSGRenderNode to issue graphics commands directly.
The second approach is more efficient, but also more complex to set up and with more corner cases to handle.

How this performs can be seen by trying out the new Mapbox GL plugin, that, in cooperation with Mapbox, has been included in Qt for most of the supported platforms. This plug-in renders Mapbox Vector Tiles using the mapbox-gl-native renderer, supporting both online and offline map sources. This plug-in also allows to select either of the two rendering approaches mentioned above (although it should be noted that the QSGRenderNode approach is experimental and may introduce problems).

The MapboxGL plugin in action

The MapboxGL plugin in action

Handing map items rendering over to the plug-in

In addition to handing the map rendering over to the plug-in, it is also possible for a QGeoMap implementation to define which types of map items it can to render by itself. With QtLocation 5.9, if a plug-in instantiates a QGeoMap that reports the ability of drawing MapPolylines, these items are handed over to the plug-in, and the default rendering path for items of that type will be disabled. They will behave just like before, but their visual appearance will depend entirely on how the plug-in renders them. The MapboxGL plugin can, for example, render native MapRectangles, MapCircles, MapPolylines and MapPolygons. They will be anti-aliased and their style can be customized using Mapbox style specifications.
On the downside, the rendering of these items entirely depends on the plugin. So, on a MapboxGL map for example, they not support borders, so setting border properties on the items will have no effect. They also do not currently support visiblity and opacity for the items, although this is something that may get fixed very soon.

MapPolyline rendered on a map using the MapboxGL plugin. The polyline has been styled using MapParameters

A MapPolyline rendered on a map using the MapboxGL plugin. The polyline has been styled using MapParameters

Exposing Plug-in – specific mapping features

Enabling the integration of third-party mapping engines opens up for the opportunity of using features that are specific to the one or the other engine. For example, the mapbox-gl-native library offers a very flexible API for changing the style of map elements at runtime.
To allow plugins to expose engine-specific features, we have introduced a new QML type, MapParameter. Elements of type MapParameter are essentially duck-typed, as properties have to be defined by the programmer according to what the documentation of the plug-in requires. In the case of the Mapbox GL plugin, a map parameter to control the visibility of a Mapbox style layer named “road-label-small” would look like this:

MapParameter {
type: \"layout\"
property var layer: \"road-label-small\"
property var visibility: \"none\"
}

Note that properties in map parameters are dynamic. They can be changed at runtime and the effects will be immediate.

Improved stacking of multiple Maps

Combining multiple map layers has been challenging with the previous Qt releases. That’s because different Map elements would have different zoom level ranges, and these ranges would also be enforced. In addition, map copyright notices could only be turned on or off, with the result of having them overlapping on screen.
In 5.9 the Map element allows the zoomLevel property to go beyond the minimum or maximum supported zoom levels, if set programmatically (that is, not through mouse or gestures interaction) and the used plug-in supports overzooming.
This way it is possible to use property bindings on the zoomLevel property of all the overlay maps to be driven by the value in a base map “layer”.

In addition, it is now possible to manually add elements of type MapCopyrightNotice on top of the maps, and source their content from the map elements. In this way they can be freely arranged, and also styled using custom CSS code.

Finally, one problem that was previously common when changing maps at runtime was that map items added to a map would be gone when the map would be replaced with another map sourced from a different plug-in.
For this reason, we include a new plug-in called itemsoverlay, whose only purpose is to provide a completely empty, transparent, map that costs almost nothing to render. The intended use is to have one Map element using this plug-in on top of the map stack, where to keep map items, so that the layers underneath can be freely removed.

Other improvements

A new method, fitViewportToVisibleMapItems, has been added to the Map element, to only consider visible items when fitting the viewport. A new QML type, MapItemGroup, has been introduced, to combine multiple map items together, like in a separate qml file. Note that it is currently not possible to use MapItemGroups in combination with MapItemViews.

The post QtLocation 5.9 appeared first on Qt Blog.





  


Разместил: Planet KDE | Дата: 05.09.2017 | Прочитано: 58 | Раздел: System & Utilities   

Рейтинг статьи

Средняя оценка: 0.00/0Средняя оценка: 0Всего голосов:0

Отлично
Хорошо Нормально Пойдёт Плохо


Смотрите также связанные темы

Нет комментариев. Почему бы Вам не оставить свой?
Вы не можете отправить комментарий анонимно, пожалуйста зарегистрируйтесь.
Google Search
Google

Web irc-unix.net

Топ Новостей
1: KDE Community announces fully open source Plasma Mobile
Hot NEWS!
Просмотров - 575


2: KWallet5 can be auto-unlocked during login again
Просмотров - 514

3: Interview with Laura
Просмотров - 489

4: Use ownCloud provided Packages, then VM, then Zip, no distro packages.
Просмотров - 485

5: Plasma Components on Android: Accelerating Subsurface Mobile Development
Просмотров - 478

6: VMware Workstation 11 and kwin - hangs and hiccups (solved?)
Просмотров - 452

7: Plasma 5 Powers KaOS Productivity
Просмотров - 443

8: KWrite on Mac – Application Bundle
Просмотров - 437

9: New Year Calligra Words Sprint
Просмотров - 415

10: FOSDEM Desktops DevRoom 2016 Call for Participation
Просмотров - 412

11: digiKam 5.0.0-beta2 is released
Просмотров - 410

12: Interview with Pierre Geier
Просмотров - 401

13: back in the habit
Просмотров - 394

14: Kexi 3
Просмотров - 393

15: Amarok is slowly catching up
Просмотров - 386

Google 120X240
Ссылки

Главная | Actual Topics | Статьи | Обратная связь | Guest Book
Генерация: 1.138 сек. и 13 запросов к базе данных за 1.098 сек.
Powered by SLAED CMS © 2005-2007 SLAED. All rights reserved.