[Talk-GB] App development (was Rossendale Way)
Nick Whitelegg
nick.whitelegg at solent.ac.uk
Wed Jan 26 15:29:38 UTC 2022
If we're talking vector tiles, Tangram is pretty good in the sense that it isn't tied to any particular vendor. It came out of Mapzen however can be used with ANY GeoJSON or mvt tile server.
I've done some work with it on a simple 'UK walkers' style, used on my Freemap site https://www.free-map.org.uk and my OpenTrail app (see Google Play or f-droid).
It is NOT a very sophisticated style compared to Andy's for example, and only really focuses on the basics (ROWs in different colours, hill names, pubs etc) but nonetheless could be used as a starting point for something more sophisticated. The nice thing about Tangram is that you can write the same map stylesheet and it will work on both a native Android app and a web app. The documentation, particularly for the Android API can be a bit of a challenge, but if anyone wants to use that I may be able to help out (time permitting)
If interested please see https://github.com/nickw1/Freemap or https://gitlab.com/nickw1/opentrail/
Nick
________________________________
From: Andy Townsend <ajt1047 at gmail.com>
Sent: 26 January 2022 13:36
To: talk-gb at openstreetmap.org <talk-gb at openstreetmap.org>
Subject: Re: [Talk-GB] App development (was Rossendale Way)
On 25/01/2022 11:26, Brian via Talk-GB wrote:
> There are some attempts, for example Philip Endecott’s UK Map. I have exchanged emails on the subject with him and now better understand why it is such a difficult problem. Andy’s map is a lot better than the OpenStreetMap Carto, but unfortunately a web site requires constant online signal and doesn’t provide the functionality for recording tracks and following routes. OsmAnd shows a lot of promise, I use it quite a lot, but always in combination with the OS Maps app for the PRoW information. I made a start at investigating how to modify the OsmAnd style sheet but it was far to complicated for me to pursue.
There are a few different problems here - one is just "providing map
information offline". For a small area that's doable with existing
well-documented raster map tools. I did a proof of concept of this sort
of thing many years ago (https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSomeoneElseOSM%2FOSMembedded&data=04%7C01%7Cnick.whitelegg%40solent.ac.uk%7C65f7a306067e4d2c8acd08d9e0d1774a%7Cd684e4cd491a4577bf33546478d72e3c%7C0%7C0%7C637788014497520902%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=sXRMP315F3w1fEYvzIHookmY0N%2BfyuwwQ2xBRbzYx8c%3D&reserved=0
). The challenge is that for every zoom level you go down, you get four
times as many raster map tiles and that limits what you can easily embed
- it's not practical as anything more than a simple proof of concept
unless you only want a _very_ small area.
The "obvious" solution to this problem is to use vector tiles, which
lets the display device do the rendering, allowing it to "zoom in" based
on the same information without the nasty pixelated "overzoom" effects
you'd get with raster tiles.
Unfortunately I'm not aware of an obvious well-documented "soup to nuts"
vector tile stack that isn't tied in to one particular vendor. I've had
a look at a few over the years with a view to adding something to
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fswitch2osm.org%2F&data=04%7C01%7Cnick.whitelegg%40solent.ac.uk%7C65f7a306067e4d2c8acd08d9e0d1774a%7Cd684e4cd491a4577bf33546478d72e3c%7C0%7C0%7C637788014497520902%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=JRTVhXIYRyhN068kzofjrzvf55uQaWN52rtoipdYl8Y%3D&reserved=0 but haven't yet found one that obviously stands
out for inclusion there. Places to look at include Mapbox's tools,
OpenMapTiles links from
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenstreetmap%2Foperations%2Fissues%2F565%23issuecomment-907303115&data=04%7C01%7Cnick.whitelegg%40solent.ac.uk%7C65f7a306067e4d2c8acd08d9e0d1774a%7Cd684e4cd491a4577bf33546478d72e3c%7C0%7C0%7C637788014497520902%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=yBdA4c3Tm1WPUUQJ8CxRwym3lCoDyaH2bP8KBTGNr4w%3D&reserved=0
, https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsystemed%2Ftilemaker&data=04%7C01%7Cnick.whitelegg%40solent.ac.uk%7C65f7a306067e4d2c8acd08d9e0d1774a%7Cd684e4cd491a4577bf33546478d72e3c%7C0%7C0%7C637788014497520902%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=6%2FhT9az%2BjDRzwv7hHmVsx3FfioFd8Kp81ByaxSk20Eo%3D&reserved=0 and
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftegola.io%2Fdocumentation%2Fgetting-started%2F&data=04%7C01%7Cnick.whitelegg%40solent.ac.uk%7C65f7a306067e4d2c8acd08d9e0d1774a%7Cd684e4cd491a4577bf33546478d72e3c%7C0%7C0%7C637788014497520902%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=dbLVqlEYv5UmNKLLtEvYuh6ZJhStpee9qDCVZt0qBv0%3D&reserved=0 .
The other part of the problem is "functionality for recording tracks and
following routes". That's not going to get created by magic code
fairies and it's not a small job, so it's going to need someone to be
paid to write that.
OsmAnd does indeed show a lot of promise. I'm not a great fan of the UI
or the lack of up-to-date documentation, but if someone wanted an app to
show offline maps in a different style, I suspect that's probably the
best place to start right now. This diary entry I wrote in 2019 will
probably need some updates for more recent Android versions, but the
principles should still apply:
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.openstreetmap.org%2Fuser%2FSomeoneElse%2Fdiary%2F391499&data=04%7C01%7Cnick.whitelegg%40solent.ac.uk%7C65f7a306067e4d2c8acd08d9e0d1774a%7Cd684e4cd491a4577bf33546478d72e3c%7C0%7C0%7C637788014497520902%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=0hRcC0pGJeK5RSlmgr5MA%2BPwvk48zyTQSNFbG95j2u4%3D&reserved=0 .
The problem with that approach on a larger scale is that I don't think
that it would be ethical to encourage people to steal the OsmAnd
developers' lunch - OsmAnd uses a limited number of downloads to
encourage people towards paid versions. An alternative might be to
contribute directly back to OsmAnd, OsmAnd's internal map style
definition is more than a bit convoluted and I don't think yet another
variation in that base style is a good way to go.
I haven't looked at Organic Maps https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Forganicmaps.app%2F&data=04%7C01%7Cnick.whitelegg%40solent.ac.uk%7C65f7a306067e4d2c8acd08d9e0d1774a%7Cd684e4cd491a4577bf33546478d72e3c%7C0%7C0%7C637788014497520902%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=5b1pDsnXNRQUGNgqj1M%2FpHE0KaSdhLwxNbZrsoUzAlA%3D&reserved=0 ("curated with
love by MapsWithMe (Maps.Me) founders"). Back in the day there was a
map creator for that Maps.Me, but I never looked at whether it supported
style redefinition or the creation of data files with extra data in them
to be rendered (like OsmAndMapCreator but for Organic Maps).
Finally it has to be said that all of the above is Android only. With
Android you can create and distribute (privately) an app for free. If
you want to distribute via Google's Play Store you'll have to pay a
one-off fee, but it is possible to distribute to Android devices in
other ways.
The "price of entry" for iOS development is much higher - there's no
easy non-app-store route, and to distribute via the app store you need
up to date Apple hardware for development and testing (at least a modern
Apple Mac and arguably also a recent iPhone). I suspect that you also
still need to pay recurring fees to Apple, and make continual code
updates in line with Apple's API deprecations*. I have nothing but
respect for those who are running along that treadmill (like Go Map!!
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fus%2Fapp%2Fgo-map%2Fid592990211&data=04%7C01%7Cnick.whitelegg%40solent.ac.uk%7C65f7a306067e4d2c8acd08d9e0d1774a%7Cd684e4cd491a4577bf33546478d72e3c%7C0%7C0%7C637788014497520902%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=gp4f0hE9eD1FOIaoghwX2eJCalsdmGS%2F10VBJvmoPfY%3D&reserved=0 ) .
>
> My programming skills are now very old and rusty and I know nothing about creating modern mobile apps, but I would like to contribute whatever I can to try to improve the offering made available for walkers & hikers. Perhaps the quickest/easiest solution would be to produce a specific walker’s style sheet for OsmAnd. If there is anyone else interested and who can teach/mentor me I an willing to have a go as part of a project team.
OsmAnd is certainly an option - try and follow the
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.openstreetmap.org%2Fuser%2FSomeoneElse%2Fdiary%2F391499&data=04%7C01%7Cnick.whitelegg%40solent.ac.uk%7C65f7a306067e4d2c8acd08d9e0d1774a%7Cd684e4cd491a4577bf33546478d72e3c%7C0%7C0%7C637788014497520902%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=0hRcC0pGJeK5RSlmgr5MA%2BPwvk48zyTQSNFbG95j2u4%3D&reserved=0 diary entry
and see what has changed and what else it should say.
Another might be to look at "what you need to do to distribute a really
simple app to me own Android phone".
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSomeoneElseOSM%2FAJTS04&data=04%7C01%7Cnick.whitelegg%40solent.ac.uk%7C65f7a306067e4d2c8acd08d9e0d1774a%7Cd684e4cd491a4577bf33546478d72e3c%7C0%7C0%7C637788014497520902%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=KuueeJsGX3OiN%2F6s2fS%2FFzfTRFNPttbcyA3qlyMMyAQ%3D&reserved=0 is a quick and dirty "maps"
example, but before looking at that I'd suggest looking at the "start
here" stuff on https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeveloper.android.com%2F&data=04%7C01%7Cnick.whitelegg%40solent.ac.uk%7C65f7a306067e4d2c8acd08d9e0d1774a%7Cd684e4cd491a4577bf33546478d72e3c%7C0%7C0%7C637788014497520902%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=qMZSlqFAEeX2Z%2BAtlSuxnzGWQ2PuvR4ApUapzVCDvc4%3D&reserved=0 that talks you through a
simple "hello world" app.
If you come from a Microsoft background then
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fxamarin%2Fandroid%2F&data=04%7C01%7Cnick.whitelegg%40solent.ac.uk%7C65f7a306067e4d2c8acd08d9e0d1774a%7Cd684e4cd491a4577bf33546478d72e3c%7C0%7C0%7C637788014497520902%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=wzRpUFnbQyRKvR7xZKE%2B2y0JrMzW6MmUb4cYw180DTU%3D&reserved=0 might be a more
familiar place to start from rather than Google's Android tools.
Best Regards,
Andy
* all based on my experience developing for iOS a few years ago
_______________________________________________
Talk-GB mailing list
Talk-GB at openstreetmap.org
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.openstreetmap.org%2Flistinfo%2Ftalk-gb&data=04%7C01%7Cnick.whitelegg%40solent.ac.uk%7C65f7a306067e4d2c8acd08d9e0d1774a%7Cd684e4cd491a4577bf33546478d72e3c%7C0%7C0%7C637788014497520902%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=nbqOqdek%2Fb5CGE6pPoaj5VweallXnTmQAGwHP%2FIbOZE%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-gb/attachments/20220126/c5508d51/attachment-0001.htm>
More information about the Talk-GB
mailing list