Commit graph

221 commits

Author SHA1 Message Date
Hans-Christoph Steiner
9b77f6fa90 claim location URLs from Nokia HERE
closes https://dev.guardianproject.info/issues/4399
2015-02-02 22:53:04 +01:00
Hans-Christoph Steiner
d34d341d65 keep Uri "path" intact during parsing for consistant regexes
By not modifying "path" from what Uri.getPath() returns, it keeps the
pattern matching consistent since the contents of "path" will always be the
same as Uri.getPath(), and what is visible in the URI itself.
2015-02-02 22:53:04 +01:00
Hans-Christoph Steiner
2771da35de GeoPointParserUtil.getQueryParameters() to return Map of all parameters
This parses out all of the parameters in the query string for both http:
and geo: URIs.  This will only work on URIs with valid syntax, so it will
not work on URIs that do odd things like have a query string in the
fragment, like this one:

http://www.amap.com/#!poi!!q=38.174596,114.995033|2|%E5%AE%BE%E9%A6%86&radius=1000
2015-02-02 22:53:04 +01:00
Hans-Christoph Steiner
3d106d00b7 support parsing amap.com URLs
amap.com aka autonavi is a popular mapping service in China.
2015-02-02 22:53:04 +01:00
Alexey Pelykh
75a0c03e40 Fix build 2015-02-02 18:15:28 +02:00
Hans-Christoph Steiner
8155e749bb use Locale.ENGLISH to format numbers for geo: links
Some locales do not use 0-9 as the digits, such as Arabic and sometimes
Chinese.  Using those numerals in a geo: URI probably would not work.
2015-02-02 16:08:30 +01:00
Hans-Christoph Steiner
3db16680b4 GeoParsedPoint.getGeoUriString() to output the data as a geo: URI
Output the data in the GeoParsedPoint as a geo: URI (http://geouri.org)
2015-02-02 16:08:30 +01:00
Hans-Christoph Steiner
58485d8ba9 rename GeoParsedPoint's named point var to "Label" after Google standard
This outlines the named point format of a geo: URI:
https://developer.android.com/guide/components/intents-common.html#Maps
2015-02-02 16:08:30 +01:00
Hans-Christoph Steiner
6f2e0029a5 remove debug message from GeoPointParserUtil.areCloseEnough() 2015-02-02 16:08:30 +01:00
Victor Shcherb
567de5806a Update geo parse utility 2015-02-02 09:25:15 +01:00
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
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
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
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
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
Alexey Pelykh
6627a4d2b5 Merge pull request #1028 from Bars107/master
Bugfix for direction drawable and test for buggy geo intent.
2014-12-29 18:41:45 +02:00
Alexey Pelykh
335a629bf1 Fix indent 2014-12-29 17:41:01 +02:00
Alexey Pelykh
9678ca155c New GEO URI parser 2014-12-29 17:37:28 +02:00
Denis
819a61216e Added test for buggy geo intent 2014-12-29 12:56:52 +02:00
Victor Shcherb
b6273d00c1 Fix zoom scale for high density phones (glitch 200-300%) 2014-10-01 00:27:01 +02:00
Victor Shcherb
13153bec28 Merge branch 'master' of ssh://github.com/osmandapp/Osmand 2014-09-27 12:44:49 +03:00
Victor Shcherb
82120c920e Add more info about error heartbeat 2014-09-27 12:44:37 +03:00
Zahnstocher
ae8141c5d8 Fix c:geo intent 2014-09-27 00:24:07 +02:00
Victor Shcherb
8dc635eae1 Update map utils 2014-09-26 10:42:47 +02:00
vshcherb
bfe1f02255 Merge pull request #873 from rilaby/geopatterns
changed the patterns to stick to one for lat, lon;
2014-09-10 14:15:10 +02:00
rilaby
d916bb0cd6 changed the patterns to ctick to one for lat, lon; added support for
integer lat, lon; added new test cases;
2014-09-10 10:18:52 +03:00
vshcherb
4f03debcfd Merge pull request #871 from rilaby/geopatterns
GeoPointParserUtils bug fixed
2014-09-08 10:34:40 +02:00
rilaby
892d07a56d GeoPointParserUtils bug fixed 2014-09-08 10:25:43 +03:00
jeepingben
7bbfcc0b7e Create LIFOBlockingDeque.java
Add support for LIFO blocking queue (deque actually)
2014-09-05 08:34:34 -04:00
rilaby
8d7d817c0a search by geo urls reworked 2014-09-04 09:47:08 +03:00
rilaby
3a9c6c37f4 GeoPointParserUtil.java added to osmAnd-java 2014-08-31 20:25:01 +03:00
Victor Shcherb
441b547a21 Add search poi along the path 2014-08-05 11:09:15 +02:00
Victor Shcherb
c1e1c10f39 Try to fix performance 2014-06-27 01:25:38 +02:00
Victor Shcherb
d9a7c973b3 Try to fix basemap generation 2014-06-13 11:32:06 +02:00
Victor Shcherb
c3d3f509c1 Refactor labels 2014-06-08 21:01:46 +02:00
vshcherb
b164eab3e2 Update Algorithms.java
Add parse color
2014-06-01 11:18:43 +02:00
vshcherb
740c829fab Use timestamp instead of date 2014-04-26 16:18:51 +02:00
vshcherb
07db561e06 Small changes 2014-02-12 01:01:28 +01:00
vshcherb
da25b2869b Add new routing config 2014-02-05 21:10:04 +01:00
vshcherb
db06f5ee00 Introduce New routing config 2014-02-02 14:06:15 +01:00
vshcherb
a7a59e3f07 Test new routing (not enabled in this commit) 2014-01-20 00:25:45 +01:00
vshcherb
65072007cd Fix small issues 2013-12-30 00:45:29 +01:00
vshcherb
847c8e8d44 Fix simulation in tunnel (too quick now) 2013-12-30 00:45:29 +01:00
vshcherb
4c67ef8209 Fix critical issue of 208% 2013-11-02 18:14:43 +01:00
vshcherb
6c7cd3d3c2 Simulate position in tunnels 2013-10-29 21:13:57 +01:00
vshcherb
9ffedce020 Update location provider 2013-10-29 01:27:01 +01:00
vshcherb
b50fd54528 Small refactoring route details 2013-10-26 14:41:07 +02:00
vshcherb
2d6ce8c5ca Add 2 fingers rotation 2013-10-06 22:47:20 +03:00
vshcherb
38328dbc26 Fix vector rendering 2013-10-06 22:47:19 +03:00
vshcherb
4aa06675ce Add parser 2013-08-31 00:24:10 +02:00
vshcherb
8fb4fdcb7a Use android time utils 2013-08-17 01:24:08 +02:00
Robin Schneider
250d26749f Improved readability with printf. 2013-08-07 18:55:56 +02:00
Robin Schneider
ff42370ec7 Merge branch 'master' into fix-OpeningHoursParser 2013-08-07 18:46:29 +02:00
Nelson A. de Oliveira
8d3c8b6e9e Fix long literals ending with l
These literals may be confusing, as lowercase 'l' looks very similar to
'1'
2013-08-03 10:48:11 -03:00
Nelson A. de Oliveira
a525df7694 Fix unnecessary bitwise operations 2013-07-31 15:39:50 -03:00
Nelson A. de Oliveira
50207ec316 Remove continue and return 2013-07-31 15:24:15 -03:00
Nelson A. de Oliveira
bf05917be5 Remove redundant local variables 2013-07-31 15:22:39 -03:00
Nelson A. de Oliveira
1bdb389eae Fix pointless aithmetic expressions 2013-07-31 15:14:11 -03:00
Nelson A. de Oliveira
61699455e5 Replace StringBuffer with String
These may be replaced with java.lang.String expressions which results in
simpler and possibly more efficient code
2013-07-31 15:09:37 -03:00
Robin Schneider
ec5d0287bf OpeningHoursParser cleanup. 2013-07-30 21:28:19 +02:00
Robin Schneider
989dd8bc09 Added length test to avoid exception.
java.lang.StringIndexOutOfBoundsException: String index out of range
2013-07-25 22:16:45 +02:00
Robin Schneider
3f963b511f Fixed problem with OpeningHoursParser.
The parser did not distinguish between "off" (valid in opening_hours)
and "of".
2013-07-23 22:48:30 +02:00
fp
20db3ea1b3 Expand OpeningHours with Month
Now the OpeningHoursParser can handle Strings like:
Mar-Sep:08:00-20:00;Oct-Feb:09:00-16:00
2013-06-25 12:11:58 +02:00
sonora
addc32965a simplify haversine formula 2013-06-18 11:00:26 +02:00
axin
7d9ee09e3c added test cases for day wrap in opening hours 2013-05-09 23:47:39 +02:00
axin
96dc5f5291 corrected handling of day wrap in opening_hours 2013-05-09 14:59:53 +02:00
Victor Shcherb
7bc162a878 Move OsmAnd java core project back to android repository for maintainance reasons 2013-04-18 23:35:20 +02:00