Merge
This commit is contained in:
commit
9705573d12
5 changed files with 64 additions and 5 deletions
|
@ -73,9 +73,9 @@ public class BinaryInspector {
|
|||
if ("test".equals(args[0])) {
|
||||
in.inspector(new String[] {
|
||||
// "-vpoi",
|
||||
"-vmap", "-vmapobjects", // "-vmapcoordinates",
|
||||
// "-vmap", "-vmapobjects", // "-vmapcoordinates",
|
||||
// "-vrouting",
|
||||
// "-vtransport",
|
||||
"-vtransport",
|
||||
// "-vaddress", "-vcities","-vstreetgroups",
|
||||
// "-vstreets", "-vbuildings", "-vintersections",
|
||||
// "-lang=ru",
|
||||
|
|
|
@ -352,6 +352,8 @@ repositories {
|
|||
|
||||
dependencies {
|
||||
compile project(path: ':OsmAnd-java', configuration: 'android')
|
||||
|
||||
|
||||
// compile project(':eclipse-compile:design')
|
||||
// compile project(':eclipse-compile:cardview')
|
||||
// compile project(':eclipse-compile:gridlayout')
|
||||
|
@ -366,3 +368,8 @@ dependencies {
|
|||
qtcoreCompile "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar"
|
||||
qtcoreCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar"
|
||||
}
|
||||
if(System.getenv("APP_FEATURES") && System.getenv("APP_FEATURES").contains("+play_market") &&
|
||||
System.getenv("PACKAGE_TO_BUILT").equals("net.osmand")) {
|
||||
println "Apply GMS plugin"
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
}
|
||||
|
|
42
OsmAnd/google-services.json
Normal file
42
OsmAnd/google-services.json
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"project_info": {
|
||||
"project_number": "521675454867",
|
||||
"firebase_url": "https://osmand-1e236.firebaseio.com",
|
||||
"project_id": "osmand-1e236",
|
||||
"storage_bucket": "osmand-1e236.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:521675454867:android:be0477f14dc015f4",
|
||||
"android_client_info": {
|
||||
"package_name": "net.osmand"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "521675454867-ttjur3617a74qj0a9rkbkbcjavvuebjp.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyBMaRMiPY-mS3J_-aX30sRBFB-WGIm-M-U"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"analytics_service": {
|
||||
"status": 1
|
||||
},
|
||||
"appinvite_service": {
|
||||
"status": 1,
|
||||
"other_platform_oauth_client": []
|
||||
},
|
||||
"ads_service": {
|
||||
"status": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
|
@ -20,10 +20,10 @@ import android.view.ViewGroup;
|
|||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import net.osmand.binary.BinaryMapIndexReader;
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.data.MapObject.MapObjectComparator;
|
||||
import net.osmand.data.PointDescription;
|
||||
import net.osmand.data.QuadRect;
|
||||
import net.osmand.osm.AbstractPoiType;
|
||||
|
@ -514,7 +514,7 @@ public class AmenityMenuBuilder extends MenuBuilder {
|
|||
|
||||
if (nearestWiki.size() > 0) {
|
||||
AmenityInfoRow wikiInfo = new AmenityInfoRow(
|
||||
"nearest_wiki", R.drawable.ic_action_wikipedia, null, app.getString(R.string.wiki_around) + " - " + nearestWiki.size(), true,
|
||||
"nearest_wiki", R.drawable.ic_action_wikipedia, null, app.getString(R.string.wiki_around) + " (" + nearestWiki.size()+")", true,
|
||||
getCollapsableWikiView(view.getContext(), true),
|
||||
0, false, false, false, 1000, null, false, false);
|
||||
buildAmenityRow(view, wikiInfo);
|
||||
|
@ -537,7 +537,7 @@ public class AmenityMenuBuilder extends MenuBuilder {
|
|||
|
||||
private void processNearstWiki() {
|
||||
QuadRect rect = MapUtils.calculateLatLonBbox(
|
||||
amenity.getLocation().getLatitude(), amenity.getLocation().getLongitude(), 100);
|
||||
amenity.getLocation().getLatitude(), amenity.getLocation().getLongitude(), 250);
|
||||
nearestWiki = app.getResourceManager().searchAmenities(
|
||||
new BinaryMapIndexReader.SearchPoiTypeFilter() {
|
||||
@Override
|
||||
|
@ -550,6 +550,15 @@ public class AmenityMenuBuilder extends MenuBuilder {
|
|||
return false;
|
||||
}
|
||||
}, rect.top, rect.left, rect.bottom, rect.right, -1, null);
|
||||
Collections.sort(nearestWiki, new Comparator<Amenity>() {
|
||||
|
||||
@Override
|
||||
public int compare(Amenity o1, Amenity o2) {
|
||||
double d1 = MapUtils.getDistance(amenity.getLocation(), o1.getLocation());
|
||||
double d2 = MapUtils.getDistance(amenity.getLocation(), o2.getLocation());
|
||||
return Double.compare(d1, d2);
|
||||
}
|
||||
});
|
||||
for (Amenity wiki : nearestWiki) {
|
||||
if (wiki.getId().equals(amenity.getId())) {
|
||||
nearestWiki.remove(wiki);
|
||||
|
|
|
@ -4,6 +4,7 @@ buildscript {
|
|||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.1.3'
|
||||
classpath 'com.google.gms:google-services:3.0.0'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue