Commit graph

17429 commits

Author SHA1 Message Date
Hans-Christoph Steiner
9bb03894a5 generate OpenStreetMap shortlinks using current char set (~ instead of @)
OpenStreetMap has changed the shortlink charset to use ~ instead of @ to be
support services like Twitter where @ has meaning.  OpenStreetMap still will
parse the old format, but only generates new shortlinks using "~".  This
commit changes OsmAnd to have the same behavior.

References:
https://wiki.openstreetmap.org/wiki/Shortlink#Code_for_encoding_.26_decoding
e84b2bd22f/app/assets/javascripts/application.js (L188)

---------------- OsmAnd-java/src/net/osmand/util/MapUtils.java ----------------
2015-01-21 11:25:51 +01:00
Hans-Christoph Steiner
50eed92015 parse lat/lon/zoom from OpenStreetMap shortlinks
This is a nice format of shortlink since it uses a public, offline algorithm
to generate them.  So Osmand can get what it needs from the shortlink
without going online.

https://wiki.openstreetmap.org/wiki/Shortlink
2015-01-21 11:25:51 +01:00
Hans-Christoph Steiner
8d927de6ac if incoming URL was properly parsed, remove GeoIntentActivity from backstack
When a user clicks on a URL that OsmAnd claims, they will first go to the
GeoIntentActivity, which will show them the processing, and any errors,
then it'll take them to the map.  Since the map will stay in the same task
as the original Activity where the user clicked it, the user is very likely
to be clicking on the back button.  Calling finish() here gives them one
less thing to click back on, since GeoIntentActivity will be removed.

closes #1037 https://github.com/osmandapp/Osmand/pull/1037
2015-01-21 11:25:51 +01:00
Hans-Christoph Steiner
2537d92a6a update MapUtils.decodeShortLinkString() to also parse zoom
This method is used to parse the custom OpenStreetMap shortlink algorithm
that encodes lat, lon, and zoom.  The previous version,
MapUtils.decodeShortLocString(), only parsed lat, lon from the shortlink.
2015-01-21 11:25:51 +01:00
Hans-Christoph Steiner
50abbb0d57 consolidate IntentFilter for matching HTTP map URIs with no specific path
This puts them all into a single <intent-filter> to improve readability and
reduce the number of IntentFilters used.  This also adds some new domains:

* maps.yandex.com
* map.baidu.cn
* map.baidu.com
* wb.amap.com
* www.amap.com
2015-01-21 11:25:51 +01:00
jan madsen
a3a1dabe28 Translated using Weblate (Danish)
Currently translated at 100.0% (1606 of 1606 strings)
2015-01-21 11:23:49 +01:00
jan madsen
d7849536c1 Translated using Weblate (Danish)
Currently translated at 100.0% (1607 of 1607 strings)
2015-01-21 11:06:12 +01:00
Hans-Christoph Steiner
147f2adf05 add BaiduMap as a URL pattern (http://map.baidu.com)
This is a mapping service that is popular in China.
2015-01-21 11:00:46 +01:00
Hans-Christoph Steiner
baf25cbb14 include test lat/lon to 5 decimal places since that's the common format
This makes the test more realistic, since most services are using at least
this much accuracy.
2015-01-21 11:00:46 +01:00
Hans-Christoph Steiner
32f7cccd0f rework OpenStreetMap URL parsing to handle current formats
It seems this code is quite out of date, because none of the URL formats
listed in the tests seem to work.  This commit updates the URL formats in
the tests, then makes all of them parse properly.  It also changes the
parsing technique, leveraging java.net.URL's built-in parsing abilities to
assist.  Also, I plan on adding a lot more URL formats, so the current code
structure made it very difficult to add to.  So each service will be split
out into its own section, starting here.
2015-01-21 11:00:46 +01:00
Hans-Christoph Steiner
7729aa7350 remove scheme arg from GeoPointParserUtil.parse(), java.net.URI provides it
Since the first step in parse() is to create a URI instance, the scheme
should come from URI.getScheme() instead of an arg.
2015-01-21 11:00:46 +01:00
Hans-Christoph Steiner
ba15646534 old-ndk-build.sh: support standard ANDROID_HOME env var
Google has defined the ANDROID_HOME env var as the standard env var to
point to the Android SDK install.  It is not so well documented, but it is
documented here and there:

https://developer.android.com/tools/testing/testing_ui.html#builddeploy
http://books.sonatype.com/mvnref-book/reference/android-dev-sect-config-build.html
2015-01-21 11:00:46 +01:00
Hans-Christoph Steiner
56eee3216f use http://osmand.net/go URL as HTTP url for sharing
For the record, I do not think it is a good idea to share location using
HTTP, it should always be HTTPS.  There are too many privacy concerns.
@vshcherb says he plans on adding HTTPS to osmand.net, so that will be good
once it happens.
2015-01-21 11:00:46 +01:00
Hans-Christoph Steiner
01bb7d091f split geo: URL creation to MapUtils.buildGeoUrl(lat, lon, z)
This follow the pattern set by MapUtils.buildShortOsmUrl().
2015-01-21 11:00:46 +01:00
Hans-Christoph Steiner
597f4b0a89 also match OSM short hostnames: osm.org and openstreetmap.org
osm.org is the official short URL for OpenStreetMap, with proper HTTPS
coming soon.  openstreetmap.org is the temporary short URL since it already
supports HTTPS.
2015-01-21 11:00:46 +01:00
Hans-Christoph Steiner
c54d8d47e8 use HTTPS URL for sharing location
In order to maintain privacy when sharing location, this changes the shared
location link to use HTTPS, thereby hiding the location info from anyone
who might be snooping on the WiFi, ISP, internet, etc.

Unfortunately, http://osm.org does not yet work with HTTPS, but the
standard OSM URLs are short enough to fit into a text message. They are
planning on supporting https://osm.org in the future:
https://github.com/openstreetmap/operations/issues/2
2015-01-21 11:00:46 +01:00
Weblate
0eb640af8c Merge remote-tracking branch 'origin/master' 2015-01-21 10:56:47 +01:00
Victor Shcherb
c90d37fcab Merge branch 'master' of github.com:osmandapp/Osmand 2015-01-21 10:56:37 +01:00
Weblate
8bb983d0e2 Merge remote-tracking branch 'origin/master' 2015-01-21 10:56:14 +01:00
vshcherb
1a767e5109 Merge pull request #1044 from Bars107/master
Added botoom action bar for favorites
2015-01-21 10:56:08 +01:00
Victor Shcherb
3a6230a952 Merge branch 'master' of github.com:osmandapp/Osmand 2015-01-21 10:55:30 +01:00
Victor Shcherb
eaf19c09b9 Update gradle 2015-01-21 10:52:10 +01:00
Weblate
59be1c3e9b Merge remote-tracking branch 'origin/master' 2015-01-21 10:31:48 +01:00
josep constanti
3538464312 Translated using Weblate (Catalan)
Currently translated at 48.6% (297 of 611 strings)
2015-01-21 10:31:41 +01:00
Leif Larsson
200b67d987 Translated using Weblate (Swedish)
Currently translated at 99.0% (1591 of 1606 strings)
2015-01-21 10:31:38 +01:00
Nicolas Palix
34a5f9900a Translated using Weblate (French)
Currently translated at 100.0% (1606 of 1606 strings)
2015-01-21 10:31:35 +01:00
jan madsen
6629b84e77 Translated using Weblate (Danish)
Currently translated at 100.0% (1606 of 1606 strings)
2015-01-21 10:31:33 +01:00
josep constanti
b9ddd04599 Translated using Weblate (Catalan)
Currently translated at 100.0% (1606 of 1606 strings)
2015-01-21 10:31:32 +01:00
xmd5a2
e209341f1c Update strings 2015-01-21 12:31:20 +03:00
Ivan Gonzalez Martin
fb6e817d29 Translated using Weblate (Spanish)
Currently translated at 100.0% (1606 of 1606 strings)
2015-01-21 10:09:11 +01:00
josep constanti
e25deb9cc7 Translated using Weblate (Catalan)
Currently translated at 100.0% (1606 of 1606 strings)
2015-01-21 08:02:09 +01:00
jan madsen
4e34918b3e Translated using Weblate (Danish)
Currently translated at 100.0% (1606 of 1606 strings)
2015-01-21 06:47:00 +01:00
Ivan Vantu5z
504a823765 Translated using Weblate (Russian)
Currently translated at 99.9% (1606 of 1606 strings)
2015-01-21 06:41:20 +01:00
Evgenii Martynenko
602b4182f1 Translated using Weblate (Russian)
Currently translated at 99.9% (1605 of 1606 strings)
2015-01-21 06:41:15 +01:00
Victor Shcherb
5b180cd1ae Update gradle 2015-01-21 03:04:32 +01:00
Victor Shcherb
b7e3eb2056 Update gradle 2015-01-21 02:58:28 +01:00
Weblate
e2358028cd Merge remote-tracking branch 'origin/master' 2015-01-21 00:53:15 +01:00
Roberto GEB
945b54b5b2 Translated using Weblate (Spanish)
Currently translated at 99.8% (1603 of 1606 strings)
2015-01-21 00:53:11 +01:00
Mirco Zorzo
d38899c73b Translated using Weblate (Italian)
Currently translated at 100.0% (1606 of 1606 strings)
2015-01-21 00:53:09 +01:00
Victor Shcherb
b0815c2b64 Merge branch 'master' of ssh://github.com/osmandapp/Osmand 2015-01-21 00:52:34 +01:00
Victor Shcherb
f4124c040b update gradle 2015-01-21 00:51:32 +01:00
Ldm Public
a0893419ab Translated using Weblate (French)
Currently translated at 100.0% (1606 of 1606 strings)
2015-01-21 00:16:26 +01:00
Viktar Palstsiuk
46c8c8818a Translated using Weblate (Belarusian)
Currently translated at 100.0% (1606 of 1606 strings)
2015-01-20 23:38:59 +01:00
Victor Shcherb
9725ec2f87 Merge branch 'master' of ssh://github.com/osmandapp/Osmand 2015-01-20 23:33:14 +01:00
Victor Shcherb
0b6738e356 Fix errors 2015-01-20 23:32:35 +01:00
Viktar Palstsiuk
30245c92d4 Translated using Weblate (Belarusian)
Currently translated at 100.0% (1604 of 1604 strings)
2015-01-20 22:46:15 +01:00
vshcherb
0c523a5226 Merge pull request #1043 from eighthave/proxy
add support for a proxy and use more HTTPS
2015-01-21 00:36:18 +03:00
ace shadow
7e0c19c7bb Translated using Weblate (Slovak)
Currently translated at 100.0% (1597 of 1597 strings)
2015-01-20 22:12:30 +01:00
vshcherb
7f58a2d753 Update SearchActivity.java 2015-01-20 16:54:39 +01:00
vshcherb
5eb82aaef5 Update SlidingTabStrip.java 2015-01-20 16:41:20 +01:00