[-]
[+]
|
Changed |
_service:tar_git:mapbox-gl-qml.spec
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,7 +2,7 @@
<service name="tar_git">
<param name="url">https://github.com/rinigus/mapbox-gl-qml.git</param>
<param name="branch">master</param>
- <param name="revision">0ad5328</param>
+ <param name="revision">2.1.1</param>
<param name="debian">N</param>
<param name="dumb">N</param>
</service>
|
[-]
[+]
|
Changed |
_service:tar_git:mapboxgl-qml-2.1.1.tar.gz/CMakeLists.txt
^
|
@@ -19,7 +19,7 @@
set(QT_MIN_VERSION "5.6.0")
find_package(Qt5 ${QT_MIN_VERSION} COMPONENTS Gui Quick Positioning Sql Svg REQUIRED)
-find_package(QMapLibre REQUIRED)
+find_package(QMapLibreGL REQUIRED)
if(USE_CURL_SSL)
find_package(PkgConfig REQUIRED)
|
[-]
[+]
|
Changed |
_service:tar_git:mapboxgl-qml-2.1.1.tar.gz/src/CMakeLists.txt
^
|
@@ -36,7 +36,7 @@
Qt5::Positioning
Qt5::Sql
Qt5::Svg
- QMapLibre)
+ QMapLibreGL)
if(USE_CURL_SSL)
add_definitions(-DUSE_CURL_SSL=1)
|
[-]
[+]
|
Changed |
_service:tar_git:mapboxgl-qml-2.1.1.tar.gz/src/include/qquickitemmapboxgl.h
^
|
@@ -54,8 +54,8 @@
#include <QHash>
#include <QMutex>
-#include <QMapLibre/Map>
-#include <QMapLibre/Settings>
+#include <QMapLibreGL/Map>
+#include <QMapLibreGL/Settings>
#include <QGeoCoordinate>
#include <string>
@@ -65,7 +65,7 @@
///////////////////////////////////////////////////////////////////////////////////
/// \brief The QQuickItemMapboxGL class
///
-/// Interface with QMapLibre for QML. API is documented in api.md available at
+/// Interface with QMapLibreGL for QML. API is documented in api.md available at
/// https://github.com/rinigus/mapbox-gl-qml/blob/master/api.md
///
/// Note that there is a difference in the order of coordinates when using GeoJSON and
@@ -351,8 +351,8 @@
private:
- void onMapChanged(QMapLibre::Map::MapChange change); ///< Follow the state of the map
- void onMapLoadingFailed(QMapLibre::Map::MapLoadingFailure type, const QString &description);
+ void onMapChanged(QMapLibreGL::Map::MapChange change); ///< Follow the state of the map
+ void onMapLoadingFailed(QMapLibreGL::Map::MapLoadingFailure type, const QString &description);
std::string resourceTransform(const std::string &url); ///< Use resource transform API to change requested URL
@@ -379,7 +379,7 @@
};
private:
- QMapLibre::Settings m_settings;
+ QMapLibreGL::Settings m_settings;
/// Signals that the first full init is done and setup-related
/// properties cannot be changed
@@ -407,8 +407,8 @@
qreal m_pitch = 0;
QMarginsF m_margins;
- QMapLibre::Coordinate m_fit_sw;
- QMapLibre::Coordinate m_fit_ne;
+ QMapLibreGL::Coordinate m_fit_sw;
+ QMapLibreGL::Coordinate m_fit_ne;
QGeoCoordinate m_fit_center;
qreal m_fit_zoomLevel = -1;
bool m_fit_preserve_box = false;
|
[-]
[+]
|
Changed |
_service:tar_git:mapboxgl-qml-2.1.1.tar.gz/src/include/qsgmapboxglnode.h
^
|
@@ -51,17 +51,17 @@
#include <QQuickItem>
#include <QGeoCoordinate>
-#include <QMapLibre/Map>
-#include <QMapLibre/Settings>
+#include <QMapLibreGL/Map>
+#include <QMapLibreGL/Settings>
class QSGMapboxGLAbstractNode : public QObject
{
Q_OBJECT
public:
- QSGMapboxGLAbstractNode(const QMapLibre::Settings &, const QSize &, qreal devicePixelRatio, qreal pixelRatio, QQuickItem *item);
+ QSGMapboxGLAbstractNode(const QMapLibreGL::Settings &, const QSize &, qreal devicePixelRatio, qreal pixelRatio, QQuickItem *item);
- QMapLibre::Map* map() const { return m_map.data(); }
+ QMapLibreGL::Map* map() const { return m_map.data(); }
float height() const { return m_map_size.height(); }
float width() const { return m_map_size.width(); }
float mapToQtPixelRatio() const;
@@ -80,7 +80,7 @@
void replyCoordinateForPixel(const QPointF p, QGeoCoordinate geo, qreal degLatPerPixel, qreal degLonPerPixel, const QVariant &tag);
protected:
- QScopedPointer<QMapLibre::Map> m_map;
+ QScopedPointer<QMapLibreGL::Map> m_map;
QSize m_map_size; ///<- size as set for map
QSize m_item_size; ///<- size of Qt item in Qt logical pixels units
qreal m_pixel_ratio;
@@ -92,10 +92,10 @@
Q_OBJECT
public:
- QSGMapboxGLTextureNode(const QMapLibre::Settings &, const QSize &, qreal devicePixelRatio, qreal pixelRatio, QQuickItem *item);
+ QSGMapboxGLTextureNode(const QMapLibreGL::Settings &, const QSize &, qreal devicePixelRatio, qreal pixelRatio, QQuickItem *item);
~QSGMapboxGLTextureNode();
- QMapLibre::Map* map() const { return m_map.data(); }
+ QMapLibreGL::Map* map() const { return m_map.data(); }
void resize(const QSize &size, qreal pixelRatio) override;
void render(QQuickWindow *) override;
@@ -112,9 +112,9 @@
Q_OBJECT
public:
- QSGMapboxGLRenderNode(const QMapLibre::Settings &, const QSize &, qreal devicePixelRatio, qreal pixelRatio, QQuickItem *item);
+ QSGMapboxGLRenderNode(const QMapLibreGL::Settings &, const QSize &, qreal devicePixelRatio, qreal pixelRatio, QQuickItem *item);
- QMapLibre::Map* map() const;
+ QMapLibreGL::Map* map() const;
void resize(const QSize &size, qreal pixelRatio);
|
[-]
[+]
|
Changed |
_service:tar_git:mapboxgl-qml-2.1.1.tar.gz/src/qmapboxsync.cpp
^
|
@@ -14,7 +14,7 @@
{
}
-void SourceList::SourceAction::apply(QMapLibre::Map *map)
+void SourceList::SourceAction::apply(QMapLibreGL::Map *map)
{
// special treatment of "data" field
if (m_asset.params.contains("data"))
@@ -76,7 +76,7 @@
m_action_stack.append( SourceAction(t, id, params) );
}
-void SourceList::apply(QMapLibre::Map *map)
+void SourceList::apply(QMapLibreGL::Map *map)
{
for (SourceAction &action: m_action_stack)
{
@@ -112,7 +112,7 @@
m_action_stack.clear();
}
-void SourceList::setup(QMapLibre::Map *map)
+void SourceList::setup(QMapLibreGL::Map *map)
{
for (Asset &asset: m_assets)
{
@@ -131,13 +131,13 @@
m_asset.params["id"] = id;
}
-void LayerList::LayerAction::apply(QMapLibre::Map *map)
+void LayerList::LayerAction::apply(QMapLibreGL::Map *map)
{
if (type() == Add)
{
if (map->layerExists(m_asset.id))
map->removeLayer(m_asset.id);
- map->addLayer(m_asset.id, m_asset.params, m_asset.before);
+ map->addLayer(m_asset.params, m_asset.before);
}
else if (type() == Remove)
map->removeLayer(m_asset.id);
@@ -155,7 +155,7 @@
m_action_stack.append( LayerAction(Action::Remove, id) );
}
-void LayerList::apply(QMapLibre::Map *map)
+void LayerList::apply(QMapLibreGL::Map *map)
{
for (LayerAction &action: m_action_stack)
{
@@ -175,7 +175,7 @@
m_action_stack.clear();
}
-void LayerList::setup(QMapLibre::Map *map)
+void LayerList::setup(QMapLibreGL::Map *map)
{
for (Asset &asset: m_assets)
{
@@ -191,7 +191,7 @@
m_action_stack.append( Property(layer, property, value) );
}
-void PropertyList::apply(QMapLibre::Map *map)
+void PropertyList::apply(QMapLibreGL::Map *map)
{
for (Property &p: m_action_stack)
{
@@ -202,7 +202,7 @@
m_action_stack.clear();
}
-void PropertyList::setup(QMapLibre::Map *map)
+void PropertyList::setup(QMapLibreGL::Map *map)
{
for (Property &p: m_properties)
{
@@ -210,12 +210,12 @@
}
}
-void LayoutPropertyList::apply_property(QMapLibre::Map *map, Property &p)
+void LayoutPropertyList::apply_property(QMapLibreGL::Map *map, Property &p)
{
map->setLayoutProperty(p.layer, p.property, p.value);
}
-void PaintPropertyList::apply_property(QMapLibre::Map *map, Property &p)
+void PaintPropertyList::apply_property(QMapLibreGL::Map *map, Property &p)
{
map->setPaintProperty(p.layer, p.property, p.value);
}
@@ -231,7 +231,7 @@
{
}
-void ImageList::ImageAction::apply(QMapLibre::Map *map)
+void ImageList::ImageAction::apply(QMapLibreGL::Map *map)
{
if (type() == Add)
map->addImage(m_image.id, m_image.image);
@@ -251,7 +251,7 @@
m_action_stack.append( ImageAction(Action::Remove, id) );
}
-void ImageList::apply(QMapLibre::Map *map)
+void ImageList::apply(QMapLibreGL::Map *map)
{
for (ImageAction &action: m_action_stack)
{
@@ -271,7 +271,7 @@
m_action_stack.clear();
}
-void ImageList::setup(QMapLibre::Map *map)
+void ImageList::setup(QMapLibreGL::Map *map)
{
for (Image &image: m_images)
{
|
[-]
[+]
|
Changed |
_service:tar_git:mapboxgl-qml-2.1.1.tar.gz/src/qmapboxsync_p.h
^
|
@@ -1,7 +1,7 @@
#ifndef QMAPBOXSYNC_H
#define QMAPBOXSYNC_H
-#include <QMapLibre/Map>
+#include <QMapLibreGL/Map>
#include <QString>
#include <QVariantMap>
@@ -34,7 +34,7 @@
public:
Action(Type t): m_type(t) {}
- virtual void apply(QMapLibre::Map *map) = 0;
+ virtual void apply(QMapLibreGL::Map *map) = 0;
Type type() const { return m_type; }
@@ -68,15 +68,15 @@
void update(const QString &id, const QVariantMap& params);
void remove(const QString &id);
- void apply(QMapLibre::Map *map);
- void setup(QMapLibre::Map *map);
+ void apply(QMapLibreGL::Map *map);
+ void setup(QMapLibreGL::Map *map);
protected:
class SourceAction: public Action {
public:
SourceAction(Type t, const QString id, const QVariantMap params = QVariantMap());
- virtual void apply(QMapLibre::Map *map);
+ virtual void apply(QMapLibreGL::Map *map);
Asset& asset() { return m_asset; }
protected:
@@ -101,15 +101,15 @@
void add(const QString &id, const QVariantMap& params, const QString &before);
void remove(const QString &id);
- void apply(QMapLibre::Map *map);
- void setup(QMapLibre::Map *map);
+ void apply(QMapLibreGL::Map *map);
+ void setup(QMapLibreGL::Map *map);
protected:
class LayerAction: public Action {
public:
LayerAction(Type t, const QString id, const QVariantMap params = QVariantMap(), const QString before = QString());
- virtual void apply(QMapLibre::Map *map);
+ virtual void apply(QMapLibreGL::Map *map);
Asset& asset() { return m_asset; }
protected:
@@ -141,11 +141,11 @@
void add(const QString &layer, const QString &property, const QVariant& value);
- void apply(QMapLibre::Map *map);
- void setup(QMapLibre::Map *map);
+ void apply(QMapLibreGL::Map *map);
+ void setup(QMapLibreGL::Map *map);
protected:
- virtual void apply_property(QMapLibre::Map *map, Property &p) = 0;
+ virtual void apply_property(QMapLibreGL::Map *map, Property &p) = 0;
protected:
QList<Property> m_properties;
@@ -156,14 +156,14 @@
public:
LayoutPropertyList(): PropertyList() {}
protected:
- virtual void apply_property(QMapLibre::Map *map, Property &p);
+ virtual void apply_property(QMapLibreGL::Map *map, Property &p);
};
class PaintPropertyList: public PropertyList {
public:
PaintPropertyList(): PropertyList() {}
protected:
- virtual void apply_property(QMapLibre::Map *map, Property &p);
+ virtual void apply_property(QMapLibreGL::Map *map, Property &p);
};
///////////////////////////////////////////////////////////
@@ -187,14 +187,14 @@
void add(const QString &id, const QImage &sprite);
void remove(const QString &id);
- void apply(QMapLibre::Map *map);
- void setup(QMapLibre::Map *map);
+ void apply(QMapLibreGL::Map *map);
+ void setup(QMapLibreGL::Map *map);
protected:
class ImageAction: public Action {
public:
ImageAction(Type t, const QString id, const QImage image = QImage());
- virtual void apply(QMapLibre::Map *map);
+ virtual void apply(QMapLibreGL::Map *map);
Image& image() { return m_image; }
protected:
|
[-]
[+]
|
Changed |
_service:tar_git:mapboxgl-qml-2.1.1.tar.gz/src/qquickitemmapboxgl.cpp
^
|
@@ -62,7 +62,7 @@
#include <QPainter>
#include <QVariantMap>
-#include <QMapLibre/Utils>
+#include <QMapLibreGL/Utils>
#include <math.h>
#include <iostream>
@@ -141,13 +141,13 @@
m_styleUrl = QStringLiteral("mapbox://styles/mapbox/streets-v10");
m_styleJson = QString(); // empty
- m_settings.setViewportMode(QMapLibre::Settings::DefaultViewport);
+ m_settings.setViewportMode(QMapLibreGL::Settings::DefaultViewport);
QFont font;
font.setStyleHint(QFont::SansSerif);
m_settings.setLocalFontFamily(font.defaultFamily());
- m_settings.setProviderTemplate(QMapLibre::Settings::MapboxProvider);
+ m_settings.resetToTemplate(QMapLibreGL::Settings::MapboxSettings);
m_settings.setResourceTransform(std::bind(&QQuickItemMapboxGL::resourceTransform,
this, std::placeholders::_1));
@@ -191,12 +191,12 @@
QVariantList QQuickItemMapboxGL::defaultStyles() const
{
QVariantList array;
- auto styles = m_settings.providerStyles();
+ auto styles = m_settings.defaultStyles();
for (const auto &i: styles)
{
QVariantMap o;
- o.insert("url", QVariant(i.url));
- o.insert("name", QVariant(i.name));
+ o.insert("url", QVariant(i.first));
+ o.insert("name", QVariant(i.second));
array.append(o);
}
@@ -977,7 +977,7 @@
QSGNode* QQuickItemMapboxGL::updatePaintNode(QSGNode *node, UpdatePaintNodeData *)
{
QSize sz(width(), height());
- QMapLibre::Map *map = nullptr;
+ QMapLibreGL::Map *map = nullptr;
m_first_init_done = true;
QSGMapboxGLAbstractNode *n = nullptr;
@@ -1043,8 +1043,8 @@
/////////////////////////////////////////////////////
/// connect map changed and failure signals
- connect(map, &QMapLibre::Map::mapChanged, this, &QQuickItemMapboxGL::onMapChanged, Qt::QueuedConnection);
- connect(map, &QMapLibre::Map::mapLoadingFailed, this, &QQuickItemMapboxGL::onMapLoadingFailed, Qt::QueuedConnection);
+ connect(map, &QMapLibreGL::Map::mapChanged, this, &QQuickItemMapboxGL::onMapChanged, Qt::QueuedConnection);
+ connect(map, &QMapLibreGL::Map::mapLoadingFailed, this, &QQuickItemMapboxGL::onMapLoadingFailed, Qt::QueuedConnection);
}
else
map = n->map();
@@ -1068,7 +1068,7 @@
if (m_syncState & FitViewNeedsSync)
{
- QMapLibre::CoordinateZoom cz = map->coordinateZoomForBounds(m_fit_sw, m_fit_ne);
+ QMapLibreGL::CoordinateZoom cz = map->coordinateZoomForBounds(m_fit_sw, m_fit_ne);
m_fit_center = QGeoCoordinate(cz.first.first, cz.first.second);
m_fit_zoomLevel = cz.second;
setCenter(m_fit_center);
@@ -1182,7 +1182,7 @@
{ // metersPerPixel
const double tol = metersPerPixelTolerance(); // tolerance used when comparing floating point numbers
- qreal mapmeters = QMapLibre::metersPerPixelAtLatitude( map->coordinate().first, map->zoom() );
+ qreal mapmeters = QMapLibreGL::metersPerPixelAtLatitude( map->coordinate().first, map->zoom() );
qreal meters = mapmeters * n->mapToQtPixelRatio();
if ( fabs(meters - metersPerPixel()) > tol )
{
@@ -1224,10 +1224,10 @@
return node;
}
-void QQuickItemMapboxGL::onMapChanged(QMapLibre::Map::MapChange change)
+void QQuickItemMapboxGL::onMapChanged(QMapLibreGL::Map::MapChange change)
{
// check if we can add user-added sources, layers ...
- if (QMapLibre::Map::MapChangeDidFinishLoadingStyle == change && m_block_data_until_loaded)
+ if (QMapLibreGL::Map::MapChangeDidFinishLoadingStyle == change && m_block_data_until_loaded)
{
m_syncState |= DataNeedsSetupSync;
m_syncState |= DataNeedsSync;
@@ -1242,7 +1242,7 @@
}
}
-void QQuickItemMapboxGL::onMapLoadingFailed(QMapLibre::Map::MapLoadingFailure /*type*/, const QString &description)
+void QQuickItemMapboxGL::onMapLoadingFailed(QMapLibreGL::Map::MapLoadingFailure /*type*/, const QString &description)
{
setError(description);
}
|
[-]
[+]
|
Changed |
_service:tar_git:mapboxgl-qml-2.1.1.tar.gz/src/qsgmapboxglnode.cpp
^
|
@@ -56,15 +56,15 @@
////////////////////////////////////////////
/// QSGMapboxGLAbstractNode
-QSGMapboxGLAbstractNode::QSGMapboxGLAbstractNode(const QMapLibre::Settings &settings, const QSize &size,
+QSGMapboxGLAbstractNode::QSGMapboxGLAbstractNode(const QMapLibreGL::Settings &settings, const QSize &size,
qreal devicePixelRatio, qreal pixelRatio, QQuickItem *item):
QObject(), m_map_size(size), m_item_size(size),
m_device_pixel_ratio(devicePixelRatio), m_pixel_ratio(pixelRatio)
{
- m_map.reset(new QMapLibre::Map(nullptr, settings, size.expandedTo(minTextureSize), pixelRatio));
+ m_map.reset(new QMapLibreGL::Map(nullptr, settings, size.expandedTo(minTextureSize), pixelRatio));
- QObject::connect(m_map.data(), &QMapLibre::Map::needsRendering, item, &QQuickItem::update);
- QObject::connect(m_map.data(), &QMapLibre::Map::copyrightsChanged, item, &QQuickItem::update);
+ QObject::connect(m_map.data(), &QMapLibreGL::Map::needsRendering, item, &QQuickItem::update);
+ QObject::connect(m_map.data(), &QMapLibreGL::Map::copyrightsChanged, item, &QQuickItem::update);
}
void QSGMapboxGLAbstractNode::resize(const QSize &size, qreal pixelRatio)
@@ -99,7 +99,7 @@
p.setX(p.x() * rx);
p.setY(p.y() * ry);
- QMapLibre::Coordinate mbc = m_map->coordinateForPixel(p);
+ QMapLibreGL::Coordinate mbc = m_map->coordinateForPixel(p);
QGeoCoordinate coor(mbc.first, mbc.second);
// get sensitivity of coordinates to the changes in pixel coordinates
@@ -107,7 +107,7 @@
double sinB = sin(bearing);
double cosB = cos(bearing);
p += QPointF(cosB + sinB, -sinB + cosB);
- QMapLibre::Coordinate mbc_shift = m_map->coordinateForPixel(p);
+ QMapLibreGL::Coordinate mbc_shift = m_map->coordinateForPixel(p);
qreal degLatPerPixel = fabs(mbc_shift.first - mbc.first) * rx;
qreal degLonPerPixel = fabs(mbc_shift.second - mbc.second) * ry;
@@ -119,7 +119,7 @@
////////////////////////////////////////////
/// QSGMapboxGLTextureNode
-QSGMapboxGLTextureNode::QSGMapboxGLTextureNode(const QMapLibre::Settings &settings, const QSize &size,
+QSGMapboxGLTextureNode::QSGMapboxGLTextureNode(const QMapLibreGL::Settings &settings, const QSize &size,
qreal devicePixelRatio,
qreal pixelRatio, QQuickItem *item)
: QSGMapboxGLAbstractNode(settings, size, devicePixelRatio, pixelRatio, item),
@@ -190,7 +190,7 @@
////////////////////////////////////////////
/// QSGMapboxGLRenderNode
-QSGMapboxGLRenderNode::QSGMapboxGLRenderNode(const QMapLibre::Settings &settings, const QSize &size,
+QSGMapboxGLRenderNode::QSGMapboxGLRenderNode(const QMapLibreGL::Settings &settings, const QSize &size,
qreal devicePixelRatio, qreal pixelRatio, QQuickItem *item)
: QSGMapboxGLAbstractNode(settings, size, devicePixelRatio, pixelRatio, item)
{
@@ -208,7 +208,7 @@
void QSGMapboxGLRenderNode::render(const RenderState *state)
{
- // QMapLibre assumes we've prepared the viewport prior to render().
+ // QMapLibreGL assumes we've prepared the viewport prior to render().
QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions();
f->glViewport(state->scissorRect().x(), state->scissorRect().y(), state->scissorRect().width(), state->scissorRect().height());
f->glScissor(state->scissorRect().x(), state->scissorRect().y(), state->scissorRect().width(), state->scissorRect().height());
|