maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Maep ported to Sailfish, work in progress (https://talk.maemo.org/showthread.php?t=91538)

dcaliste 2013-10-07 08:01

Maep ported to Sailfish, work in progress
 
2 Attachment(s)
Hello,

I'm using Męp almost every day on my N900 and I didn't see any proposition of porting it to Sailfish, so I'm trying. First thanks a lot to the developer and contributors of this program, I love it.

So, I've separated the logic of map drawing of the GTK widgetry. I've switched from GdkPixbuf to Cairo for the tile handling. And I've made a QQuickItem that can display the cairo surface.

I've tried to keep as much as possible the source compatible to compile for Maemo or Sailfish, but it's currently a work in progress and I've broken several Maemo parts that I need to correct. At the moment, the following is working:
- see the map ;
- move the map with the mouse ;
- scale, coordinates, zoom osd and source osd are displayed and work;
- load and save position and other settings to gconf.
Things that are currently broken :
- the jpeg sources (Google, virtual earth) ;
- the wikipedia and geoname searching ;
- GPS handling ;
- tracks handling.

I'm working on the broken parts, but I wanted to publish what has been done if someone is interested to give a look.

What to do to test :
- have the Sailfish SDK (!);
- ssh to the SDK virtual machine ssh -p 2222 -i ~/SailfishOS/vmshare/ssh/private_keys/engine/mersdk mersdk@localhost
- install missing packages (sudo zypper in glib2-devel cairo-devel libsoup-devel gconf-devl qt5-qmake)
- untar the sources and create a tmp directory
- in the tmp dir run qmake ../src/maep.pro
- issue make
- from the desktop copy maep-qt and main.qml to the emulator virtual machine and connect there
- sudo copy maep-qt to /usr/bin
- sudo mkdir /usr/share/applications/maep-qt
- sudo cp main.qml /usr/share/maep-qt
- sudo chmod -R a+rX /usr/share/maep-qt
- sudo vim /usr/share/applications/maep.desktop and copy this into:
[Desktop Entry]
Type=Application
Name=Męp
Icon=icon-launcher-default
Exec=invoker --type=e /usr/bin/maep-qt
Comment=Map browser with GPS capabilities
- sudo chmod a+r /usr/share/applications/maep.desktop
- click on the icon !

If QT5 is properly installed on your desktop machine, it's possible to run it directly there. Compile it in a tmp dir and run it directly from there ./maep-qt -desktop.

thp 2013-10-07 08:50

Re: Maep ported to Sailfish, work in progress
 
Nice work! Would be great if you could push the source to a Git repository. You can e.g. post it to https://github.com/sailfishapps (let me know your github username, and I'll set up a repo in sailfishapps for you or just send me the URL of your Github repo of the app, and I'll fork it into sailfishapps and give you push permissions).

dcaliste 2013-10-07 10:32

Re: Maep ported to Sailfish, work in progress
 
Thank's for the proposition. Currently, I've written to the authors of Męp to know if they want to include the modifications I've made for it to work on Sailfish in addition to Maemo (well currently I've broken many things on Maemo so that's for a bit later but anyway).

I don't want to generate separate repositories for hosting Męp sources. If they are interested and my modifications finally land there, maybe you can mirror their repository in sailfishapps. If they are not interested, I'll create an account and push my modifications in sailfishapps.

Once again, thanks a lot for the support, I'll give info when I get some.

dcaliste 2013-10-18 08:52

Re: Maep ported to Sailfish, work in progress
 
2 Attachment(s)
I've continued to work on Męp for Sailfish, adding QML interface to the geonames search and wiki info, as implemented before for Maemo.

I join a screenshot showing these features.

When clicking on a balloon, a second page appears loading the wikipedia page with the QML WebView of Webkit. I don't know if it's better or not to keep the Maemo behaviour having a summary only in Męp and a "open in browser" button.

One can see a display bug in the screenshot, the crosshair at map centre being above the balloon "Grenoble". I need to correct this.

I choose to always display the search text entry since I need place on top anyway for the header and the pulley menu. Currently, the pulley menu contains the wikipedia checkitem.

Next step, the GPS… and then tracks and about dialog.

The Maemo and Sailfish version currently use different source code for geonames and wiki, I need to unify this again.

The author of Męp, Till Harbaum, kindly agrees for me to do this work for Sailfish. I'll ask him a branch on the SVN account of Męp if he thinks it's better like that.

mikecomputing 2013-10-18 18:18

Re: Maep ported to Sailfish, work in progress
 
Why not just clone it and push it to github instead of SV? IF author allow it ofcourse?

dcaliste 2013-10-18 21:58

Re: Maep ported to Sailfish, work in progress
 
I will ask him to do this so people can test more easily. but in two or three weeks I guess, because I'm going to be off for work reasons for a while.

I also notice that the QML file I've sent is not the one from the virtual machine with which I made the screen shot. Sorry, I'll try to post the correct one if I can in the coming days.

dcaliste 2013-11-08 09:49

Re: Maep ported to Sailfish, work in progress
 
3 Attachment(s)
Here are three screenshots of the last developments:
- use of a Drawer instead of self-made list to display search results ;
- implementation of Nominatim search in addition to existing Geonames search (allow exact address search from OSM if available) ;
- port from Maemo of the display page for a selected place.

Not shown on screenshots :
- Gps position handling (not tested, need a device), it should work ;
- Track support (display current track), track saving and loading is not ported because of lack of file chooser support in Sailfish at the moment ;
- screen rotation support.

dcaliste 2013-11-12 09:46

Re: Maep ported to Sailfish, work in progress
 
You can branch the sources with bzr or git at:
bzr branch lp:~damien-caliste/+junk/maep-qt
git clone https://github.com/dcaliste/maep-qt.git

I'm working on the packaging now to deploy on Sailfish easily before finishing to port missing functionalities from Maemo to Sailfish.

dcaliste 2013-11-13 14:02

Re: Maep ported to Sailfish, work in progress
 
Rpm packaging is Ok. One can try the rpm in the emulator by downloading:
http://dcaliste.free.fr/devel/maep-q...3.7-2.i586.rpm

Then, install it with:
sudo rpm -i maep-qt-1.3.7-2.i586.rpm

Dependencies are required, use "sudo zypper wp file" to know in which package to find "file", then "sudo zypper in package" to install the dependency.

dcaliste 2013-11-25 11:39

Re: Maep ported to Sailfish, work in progress
 
Here are some new packages for Męp, with the following improvements:
- JPG (google and virtual earth sattelite) tiles are back ;
- filechooser for Import / export of tracks ;
- about window ;
- thanks to Thomas Perl, some corrections on packaging ;
- bug of pull down menu below the map corrected ;
- bug of map resize on device rotated (maybe) fixed.

Find a i586 package for the emulator at :
http://dcaliste.free.fr/devel/maep-q...3.7-3.i586.rpm
Or an ARM package for the device itself at :
http://dcaliste.free.fr/devel/maep-q...-3.armv7hl.rpm

Keep track of the developments at :
https://github.com/dcaliste/maep-qt

dcaliste 2013-12-02 09:01

Re: Maep ported to Sailfish, work in progress
 
1 Attachment(s)
Some news:
- The source selection and the zoom is now done via Sailfish styled controls at the bottom of the map, using a gradient transparency to the background image as background;
- The top of the map area has rounded corner;
- Mapquest is used as rendering for OSM II;
- Port the missing bug and donate pages in the about section;
- Open links in the desktop browser instead of inside Męp;
- Correct the spurious fog effect on the cover;
- Use previews in the source selection;
- Rename everything to validate harbour rules on naming.

The RPMs are here (they won't be on the harbour immediately since the harbour currently forbid the use of Glib, Cairo, QtPositioning…):
http://dcaliste.free.fr/devel/maep-q...3.7-5.i586.rpm
http://dcaliste.free.fr/devel/maep-q...-5.armv7hl.rpm

(There is no rounded corners on the screenshot because it was done before !)

dcaliste 2014-01-09 09:29

Re: Maep ported to Sailfish, work in progress
 
1 Attachment(s)
Now that I have a device, I can test Męp and use it for real. So some bug corrections with respect to previous RPMs:
- the source selector is now working ;
- when tracking is enabled, the map don't zoom anymore to the entire earth when one get the first GPS fix ;
- the auto-center button is working, but still a bit difficult to activate…

There is also a UI improvement:
- a button has been added near the search field to reopen the last search results and results appear in a larger item size for big fingers !

Some bugs remain:
- the import / export track dialog is still messed up ;
- the wikipedia icons are too small for fingers and it is almost impossible to click on a balloon description ;
- the pulley menu of the about page appears at once without pulling ;
- the landscape orientation will need a lot of rework.

Beside this, Męp is quite usable as a day to day map and GPS tracker. I'm already using it regularly.

I made new RPMs:
http://dcaliste.free.fr/devel/maep-q...3.7-6.i586.rpm
http://dcaliste.free.fr/devel/maep-q...-6.armv7hl.rpm

Enjoy and report bugs at https://github.com/dcaliste/maep-qt

kpblxa 2014-01-09 09:44

Re: Maep ported to Sailfish, work in progress
 
can you posh it to openrepos so that it is easier to track the progress of updates?

thanks

dcaliste 2014-01-09 10:57

Re: Maep ported to Sailfish, work in progress
 
Ok, done: https://openrepos.net/content/dcaliste/maep-qt

kpblxa 2014-01-09 11:02

Re: Maep ported to Sailfish, work in progress
 
Quote:

Originally Posted by dcaliste (Post 1405074)

That was quick

thanks :D

dcaliste 2014-01-09 11:11

Re: Maep ported to Sailfish, work in progress
 
You're welcome, I just copy-paste what I prepared already for the harbour. It is still not in because of some QML blacklisted modules and libraries. So OpenRepo is a nice place to start with.

youmeego 2014-01-09 11:26

Re: Maep ported to Sailfish, work in progress
 
can you remove the zoom glass? Or make it prettier ?

dcaliste 2014-01-09 11:41

Re: Maep ported to Sailfish, work in progress
 
Two things:
- originally Męp didn't support pinch to zoom gesture (because it is based on a one-input only device from the Nx00 era in Nokia). I plan to implement it but I'm quite busy up to February for quite "heavy" development like that. But it will come ;)
- even with pinch to zoom gesture, I like to have one finger controls (for instance when looking at it on my bicycle, I have only one hand free to zoom and hold the device), so I think I'll keep the buttons anyway.

About the rendering of then, I'm not a graphist so I'm using the zoom icons of the camera from the Jolla theme. Besides it help to keep a consistent look through different applications.

Do you have any suggestions on how you would prefer it to be ? I would gladly try to implement them.

uTMY 2014-01-09 11:58

Re: Maep ported to Sailfish, work in progress
 
Curious, does openstreetmap have any equivalent satellite view that google map/ios map have?

rgds

dcaliste 2014-01-09 12:51

Re: Maep ported to Sailfish, work in progress
 
1 Attachment(s)
As far as I know, OpenStreetMap doesn't provide any aerial photographs of Earth. But Męp can use several tile sources, as shown on the screenshot, so you can alternate OSM view with Virtual Earth Satellite if you want.

I use this much to have a look at the public transportation map for instance, or the cycle one to get the elevation levels.

katajpek 2014-01-10 11:05

Re: Maep ported to Sailfish, work in progress
 
Do you think that http://map.openseamap.org/ can add to a tile source too?

It would be nice if Jolla/Sailfish has navigation software too;)

Jordi 2014-01-10 13:01

Re: Maep ported to Sailfish, work in progress
 
Nice work, thanks for this port! :)

The power usage seems to be minimal during the tracking which is good!

A problem though, I was not able to save my first track but maybe I did something wrong...

Is there a possibility to change the GPS measurement intervals? I would like to have the ability to modify this depending on the activity/lenght of the tracking.

The area for the map could be bigger, space is wasted at the top and the bottom of the screen. For example, the button for changing the type of map could be somewhere else: pulley menu?

Thanks again for this great app!

dcaliste 2014-01-11 13:31

Re: Maep ported to Sailfish, work in progress
 
Quote:

Originally Posted by Jordi (Post 1405403)
A problem though, I was not able to save my first track but maybe I did something wrong...

Sorry for this, it's a pending bug. Not difficult at all to correct, I didn't have time to investigate up to now. It seems that I'm not getting the right path from QML…

This port is still under development to be fully operational as Męp was on Maemo. But I try to correct issues as fast as possible, on Monday maybe !

Quote:

Originally Posted by Jordi (Post 1405403)
Is there a possibility to change the GPS measurement intervals? I would like to have the ability to modify this depending on the activity/lenght of the tracking.

It's not possible now, it's hard coded. But it's very easy to make it a parameter. I'll do it soon.

Quote:

Originally Posted by Jordi (Post 1405403)
The area for the map could be bigger, space is wasted at the top and the bottom of the screen. For example, the button for changing the type of map could be somewhere else: pulley menu?

The top part is to have a place to pull for the the pulley menu, because pulling somewhere else pull the map. For the bottom part, I don't know if you know Męep on Maemo, it has some button on the map to get the source list. I thought that changing it to what it is now was not wasting too much space while being in the look and feel of Sailfish (a bit like on the cover).

I can't put too many option in the pulley menu otherwise it's too long for landscape orientation for instance. I'll try to think about this.

Quote:

Originally Posted by Jordi (Post 1405403)
Thanks again for this great app!

Thanks, but the original work was done by Till Harbaum, I just port it from Maemo to Sailfish.

dcaliste 2014-01-11 13:33

Re: Maep ported to Sailfish, work in progress
 
Quote:

Originally Posted by katajpek (Post 1405358)
Do you think that http://map.openseamap.org/ can add to a tile source too?

I can give a look. If it use the same 256x256 tile format as OpenStreetMap is doing and that they authorise external map to HTTP GET those tiles, it will be very easy to integrate.

dcaliste 2014-01-11 13:40

Re: Maep ported to Sailfish, work in progress
 
@otsaloma
My previous phone was a N900, and I was using Męp on it all the time (I love maps). I try Marble on it some times but I feel less responsive and not as convenient as Męp. I don't want to start a troll here. Marble is a great software and surely well coded, I didn't give a look more than that.

When I decide to switch to a Jolla, it was also because Mer provide the kind of libraries I'm accustomed to (Glib, Cairo, …). So I was wondering if it would be possible to port Męp which was working like a charm (debugged and so on) on my N900 to the Jolla device with a minimal work load. It happened that it was the case, Qt and Glib interact pretty well together and Cairo also. So Męep-qt is here, using the code of Męp with a QML interface.

I'm coming from the Gtk world, so I don't know about Qt mapping possibilities. I pretty sure it has good one, but I didn't try.

For osm-gps-map, in fact, Męp is using it. The map rendering and tile fetching by it.

dcaliste 2014-01-11 19:28

Re: Maep ported to Sailfish, work in progress
 
I don't know what is your time frame for your own project, but I'm open to colaborate to have a reusable component from the current status of the code. Actually the map component is alrrady not too badly separated from the rest but it lacks a good layer API to easily add pois... Feel free to contact me or to give a look to the code and ask for improvements. I will be more available for coding from February.

magnunor 2014-01-11 19:50

Re: Maep ported to Sailfish, work in progress
 
Do you think this would work on the N9 without too much modifications?

dcaliste 2014-01-12 11:55

Re: Maep ported to Sailfish, work in progress
 
@magnunor
I don't know. It depends on the available libraries on the N9. The requirements for Maep are glib, cairo, gconf, curl and soup which are quite standard. The UI part should be adapted though because the QML components for Sailfish are different from the one of the N9. In addition, the binding of the cairo stuff with QML should work, I tested them quickly with QT4.8 before starting with QT5 for Sailfish. The GPS handling should be adapted also because currently, it's using QPositioning which is part of QT5.2.

katajpek 2014-01-13 06:59

Re: Maep8246462 ported to Sailfish, work in progress
 
Quote:

Originally Posted by dcaliste (Post 1405626)
I can give a look. If it use the same 256x256 tile format as OpenStreetMap is doing and that they authorise external map to HTTP GET those tiles, it will be very easy to integrate.


OpenSeaMap is part of OpenStreetMap and uses its database.
http://wiki.openstreetmap.org/wiki/OpenSeaMap

As far as i understand it is same file format as OpenStreetmap.

dcaliste 2014-01-13 16:22

Re: Maep ported to Sailfish, work in progress
 
Some bug corrections:
- import / export layout are now OK ;
- properly save the exported track ;
- try to correct a crashing bug after searching for something (an issue in Curl in fact)
- use bigger icons for wikipedia data.

Remaining ones:
- auto-centering is not removed by moving the map ;
- still impossible to select a wikipedia balloon.

Changes:
- use a lighter gradient for the bottom toolbar and shift a bit the icons of the toolbar to the bottom ;
- use a gconf parameter to change the GPS refresh rate (a parameter page to change this in the UI should appear next).

Package can be found on openrepos or download from here:
- http://dcaliste.free.fr/devel/maep-q...3.7-7.i586.rpm
- http://dcaliste.free.fr/devel/maep-q...-7.armv7hl.rpm

dcaliste 2014-01-13 17:12

Re: Maep ported to Sailfish, work in progress
 
Sorry, these RPM break the GPS handling. You should not use them. I'll correct this tomorrow.

dcaliste 2014-01-14 13:05

Re: Maep ported to Sailfish, work in progress
 
There was a mistake in the previous RPMs. Sorry. I corrected it and add the setting page I was talking about:
http://dcaliste.free.fr/devel/maep-q...3.7-8.i586.rpm
http://dcaliste.free.fr/devel/maep-q...-8.armv7hl.rpm

This 1.3.7-8 version is also available on OpenRepos.

Jordi 2014-01-16 11:26

Re: Maep ported to Sailfish, work in progress
 
Even with the last version, I'm not able to save a track. :(

Any hint?

dcaliste 2014-01-16 11:54

Re: Maep ported to Sailfish, work in progress
 
Sorry, during my tests, it's working. Can you ellaborate, describe the way to reproduce ? I'll try to help as much as I can then.

Jordi 2014-01-16 13:46

Re: Maep ported to Sailfish, work in progress
 
I made some tests : when you press the "save" button on the keyboard, it's working. But if you press the "Save current track" on the top right corner or if you swipe to the left, nothing is saved.

dcaliste 2014-01-16 13:58

Re: Maep ported to Sailfish, work in progress
 
Ok, I understand, I'll correct. Thanks for the infos.

Victorious 2014-01-21 16:26

Re: Maep ported to Sailfish, work in progress
 
From 18 january and hitherto - I can not boot map "OpenStreetMap I". Other Maps are loaded properly.: (

dcaliste 2014-01-22 08:08

Re: Maep ported to Sailfish, work in progress
 
There is an issue with the original code of Męp. It is using a browser user-agent string to identify itself to the tile servers. This is not complying with OSM rules to use their tile servers. So they have blocked us.

I have contacted the OSM tile server contact person and have explained that it is not intentional and comes from the history of Męp. I've changed the user-agent of Męp to be more explicit.

There are other rules that Męp is not complying with, so I'm updating what I can. See the rules:
http://wiki.openstreetmap.org/wiki/Tile_usage_policy

Essentially, the copyright mention is missing. I've added it yesterday. I'm going to release a new RPM with corrections today or tomorrow.

Sorry for the inconvenience, I discovered it with you and try to patch it in my spare time !

richardski 2014-01-22 08:25

Re: Maep ported to Sailfish, work in progress
 
brilliant work in bringing Open Street Map to the jPhone:)

Richard

dcaliste 2014-01-22 09:04

Re: Maep ported to Sailfish, work in progress
 
New RPMs for Męp:
http://dcaliste.free.fr/devel/maep-q...3.7-9.i586.rpm
http://dcaliste.free.fr/devel/maep-q...-9.armv7hl.rpm

Bug corrections:
- auto centering is correctly working (i.e. tapping on the GPS icon highlight it and the map is auto-centered, and moving the map by hand cancel it) ;
- accept in the export dialog of a track by swyping or tapping on the header works as expected

Modifications:
- use a correct user-agent to download tiles (maep-libsoup/1.3.7 instead of a browser-like one) ;
- display the copyright for each map in the source selection dialog, add also a link to the full copyright page for each map.
These two modifications should correct the issue of tile downloading from OpenStreetMap tile servers.

The new package is also available in OpenRepos.


All times are GMT. The time now is 21:38.

vBulletin® Version 3.8.8