[SailfishDevel] QtLocation | Qt 5.6 - alternatives (PinchMap)

Martin Kolman martin.kolman at gmail.com
Tue Jan 3 19:44:38 UTC 2017


Mon, 02 Jan 2017 01:09:49 +0000 Helicalgear .:
> Hi,
>
> Qt5.2 itself provided the "QtLocation" as you see.
> But, unfortunately, QtLocation is not allowed to use for 3rd party 
> apps officially, right now.
>
> Please see "Sailfish FAQ"
> https://harbour.jolla.com/faq#QML_API
> And the list of modules which can be used by 3rd party apps.
> https://github.com/sailfish-sdk/sdk-harbour-rpmvalidator/blob/master/allowed_qmlimports.conf
>
> The number of listed modules is increasing time by time.
> I think we have no choice but to wait for that the QtLocation add to 
> the list if you want to release your app officially (by Jolla Store).
There are other - possibly less convenient but Jolla Store copamatible - 
ways of showing a map on Sailfish OS than Qt Location.

Probably the most used Qt Location alternative is the PinchMap QML 
element, which was originally written for the Qt port of AGTL (Advanced 
Geocaching Tool for Linux) but has since found its way to many 
mapping-related applications on Sailfish OS and elsewhere. It usually 
supports just display of tiled map layers and simple POI, but can be 
quite easily extended & tweaked it's implemented completely in QML. 
Thanks to this it's also totally independent on Qt Location and is 
already used by applications in Jolla Store, such as modRana or Foursail.

As for where to "get" the PinchMap QML element - at the moment its 
basically being used as a copy-lib with various applications including 
the PinchMap.qml file as part of their source code, usually with various 
twekas, changes and improvements. These are the PinchMap.qml versions I 
know about:

https://github.com/webhamster/advancedcaching/blob/master/advancedcaching/qml/PinchMap.qml
- this is the basically the original version targeting 
Harmattan/N9/QtQuick 1.1

https://github.com/Maledictus/foursail/blob/master/qml/PinchMap.qml
- PinchMap as used by Foursail (QtQuick 2.0)
- should be fairly self contained

https://github.com/jmlich/devconf-sailfish/blob/master/qml/PinchMap.qml
https://github.com/rh-lab-q/confla-android/blob/master/PinchMap.qml
- these look like possibly a bit more modern versions with some 
app-specific tweaks

https://github.com/M4rtinK/modrana/blob/master/modules/gui_modules/gui_qt5/qml/PinchMap.qml
- PinchMap as used by current stable modRana release branch
- quite heavily tweaked and improved
- uses a Python backend via PyOtherSide for tile download/storage/lookup
- has some support for showing POI markers and routes

https://github.com/M4rtinK/modrana/blob/master-better_tile_display/modules/gui_modules/gui_qt5/qml/PinchMap.qml
- further improved PinchMap version
- provides flicker free & more efficient tile display support via a 
custom QML-side tile data model
- still has some bugs, especially in its coordinate conversion functions
- will be part of a modRana stable release once the bugs are ironed out


Other than PinchMap, there is also Maep which I *think* might be also 
adapted as a map widget:
https://github.com/dcaliste/maep-qt

Also I guess worst case one could also use a web-view and some of the 
Javascript based tiled-map frameworks such as Leaflet.

> Or, I think that you can try to release your app by other way like 
> OpenRepos ( https://openrepos.net/ ).
>
> Best regards,
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20170103/739fab6a/attachment.html>


More information about the Devel mailing list