diff --git a/OsmAnd/res/drawable-hdpi/mx_amenity_food_court.png b/OsmAnd/res/drawable-hdpi/mx_amenity_food_court.png new file mode 100644 index 0000000000..7de1c73112 Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/mx_amenity_food_court.png differ diff --git a/OsmAnd/res/drawable-hdpi/mx_amenity_grave_yard.png b/OsmAnd/res/drawable-hdpi/mx_amenity_grave_yard.png new file mode 100644 index 0000000000..95a36f28cc Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/mx_amenity_grave_yard.png differ diff --git a/OsmAnd/res/drawable-hdpi/mx_landuse_cemetery.png b/OsmAnd/res/drawable-hdpi/mx_landuse_cemetery.png new file mode 100644 index 0000000000..95a36f28cc Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/mx_landuse_cemetery.png differ diff --git a/OsmAnd/res/drawable-hdpi/mx_landuse_forest.png b/OsmAnd/res/drawable-hdpi/mx_landuse_forest.png new file mode 100644 index 0000000000..bd9a8db1f3 Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/mx_landuse_forest.png differ diff --git a/OsmAnd/res/drawable-hdpi/mx_landuse_grass.png b/OsmAnd/res/drawable-hdpi/mx_landuse_grass.png new file mode 100644 index 0000000000..bda0a74eff Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/mx_landuse_grass.png differ diff --git a/OsmAnd/res/drawable-hdpi/mx_leisure_ice_rink.png b/OsmAnd/res/drawable-hdpi/mx_leisure_ice_rink.png new file mode 100644 index 0000000000..f3037d45c8 Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/mx_leisure_ice_rink.png differ diff --git a/OsmAnd/res/drawable-hdpi/mx_military_danger_area.png b/OsmAnd/res/drawable-hdpi/mx_military_danger_area.png new file mode 100644 index 0000000000..e2c8db0d93 Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/mx_military_danger_area.png differ diff --git a/OsmAnd/res/drawable-hdpi/mx_natural_beach.png b/OsmAnd/res/drawable-hdpi/mx_natural_beach.png new file mode 100644 index 0000000000..b403ca7b49 Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/mx_natural_beach.png differ diff --git a/OsmAnd/res/drawable-hdpi/mx_natural_glacier.png b/OsmAnd/res/drawable-hdpi/mx_natural_glacier.png new file mode 100644 index 0000000000..bbba9d3939 Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/mx_natural_glacier.png differ diff --git a/OsmAnd/res/drawable-hdpi/mx_natural_scrub.png b/OsmAnd/res/drawable-hdpi/mx_natural_scrub.png new file mode 100644 index 0000000000..be52f62baf Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/mx_natural_scrub.png differ diff --git a/OsmAnd/res/drawable-hdpi/mx_natural_swamp.png b/OsmAnd/res/drawable-hdpi/mx_natural_swamp.png new file mode 100644 index 0000000000..49dc40b1ae Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/mx_natural_swamp.png differ diff --git a/OsmAnd/res/drawable-hdpi/mx_sport_billiard.png b/OsmAnd/res/drawable-hdpi/mx_sport_billiard.png new file mode 100644 index 0000000000..5366483e5f Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/mx_sport_billiard.png differ diff --git a/OsmAnd/res/drawable-hdpi/mx_sport_gymnastics.png b/OsmAnd/res/drawable-hdpi/mx_sport_gymnastics.png new file mode 100644 index 0000000000..b31a0b6b3a Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/mx_sport_gymnastics.png differ diff --git a/OsmAnd/res/drawable-hdpi/mx_sport_skating.png b/OsmAnd/res/drawable-hdpi/mx_sport_skating.png new file mode 100644 index 0000000000..f3037d45c8 Binary files /dev/null and b/OsmAnd/res/drawable-hdpi/mx_sport_skating.png differ diff --git a/OsmAnd/res/drawable-mdpi/mx_amenity_food_court.png b/OsmAnd/res/drawable-mdpi/mx_amenity_food_court.png new file mode 100644 index 0000000000..20a70f3c46 Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/mx_amenity_food_court.png differ diff --git a/OsmAnd/res/drawable-mdpi/mx_amenity_grave_yard.png b/OsmAnd/res/drawable-mdpi/mx_amenity_grave_yard.png new file mode 100644 index 0000000000..64f8f901a9 Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/mx_amenity_grave_yard.png differ diff --git a/OsmAnd/res/drawable-mdpi/mx_landuse_cemetery.png b/OsmAnd/res/drawable-mdpi/mx_landuse_cemetery.png new file mode 100644 index 0000000000..64f8f901a9 Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/mx_landuse_cemetery.png differ diff --git a/OsmAnd/res/drawable-mdpi/mx_landuse_forest.png b/OsmAnd/res/drawable-mdpi/mx_landuse_forest.png new file mode 100644 index 0000000000..98f1ad09c5 Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/mx_landuse_forest.png differ diff --git a/OsmAnd/res/drawable-mdpi/mx_landuse_grass.png b/OsmAnd/res/drawable-mdpi/mx_landuse_grass.png new file mode 100644 index 0000000000..28f32b9f63 Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/mx_landuse_grass.png differ diff --git a/OsmAnd/res/drawable-mdpi/mx_leisure_ice_rink.png b/OsmAnd/res/drawable-mdpi/mx_leisure_ice_rink.png new file mode 100644 index 0000000000..f6addcd414 Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/mx_leisure_ice_rink.png differ diff --git a/OsmAnd/res/drawable-mdpi/mx_military_danger_area.png b/OsmAnd/res/drawable-mdpi/mx_military_danger_area.png new file mode 100644 index 0000000000..4083369fdc Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/mx_military_danger_area.png differ diff --git a/OsmAnd/res/drawable-mdpi/mx_natural_beach.png b/OsmAnd/res/drawable-mdpi/mx_natural_beach.png new file mode 100644 index 0000000000..94fad1f976 Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/mx_natural_beach.png differ diff --git a/OsmAnd/res/drawable-mdpi/mx_natural_glacier.png b/OsmAnd/res/drawable-mdpi/mx_natural_glacier.png new file mode 100644 index 0000000000..ef23b8d990 Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/mx_natural_glacier.png differ diff --git a/OsmAnd/res/drawable-mdpi/mx_natural_scrub.png b/OsmAnd/res/drawable-mdpi/mx_natural_scrub.png new file mode 100644 index 0000000000..07beed61ea Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/mx_natural_scrub.png differ diff --git a/OsmAnd/res/drawable-mdpi/mx_natural_swamp.png b/OsmAnd/res/drawable-mdpi/mx_natural_swamp.png new file mode 100644 index 0000000000..9e00425ae9 Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/mx_natural_swamp.png differ diff --git a/OsmAnd/res/drawable-mdpi/mx_sport_billiard.png b/OsmAnd/res/drawable-mdpi/mx_sport_billiard.png new file mode 100644 index 0000000000..ae2b51f02e Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/mx_sport_billiard.png differ diff --git a/OsmAnd/res/drawable-mdpi/mx_sport_gymnastics.png b/OsmAnd/res/drawable-mdpi/mx_sport_gymnastics.png new file mode 100644 index 0000000000..cb5efee210 Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/mx_sport_gymnastics.png differ diff --git a/OsmAnd/res/drawable-mdpi/mx_sport_skating.png b/OsmAnd/res/drawable-mdpi/mx_sport_skating.png new file mode 100644 index 0000000000..f6addcd414 Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/mx_sport_skating.png differ diff --git a/OsmAnd/res/drawable-xhdpi/mx_amenity_food_court.png b/OsmAnd/res/drawable-xhdpi/mx_amenity_food_court.png new file mode 100644 index 0000000000..13dcf5172a Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/mx_amenity_food_court.png differ diff --git a/OsmAnd/res/drawable-xhdpi/mx_amenity_grave_yard.png b/OsmAnd/res/drawable-xhdpi/mx_amenity_grave_yard.png new file mode 100644 index 0000000000..47ca86a1a0 Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/mx_amenity_grave_yard.png differ diff --git a/OsmAnd/res/drawable-xhdpi/mx_landuse_cemetery.png b/OsmAnd/res/drawable-xhdpi/mx_landuse_cemetery.png new file mode 100644 index 0000000000..47ca86a1a0 Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/mx_landuse_cemetery.png differ diff --git a/OsmAnd/res/drawable-xhdpi/mx_landuse_forest.png b/OsmAnd/res/drawable-xhdpi/mx_landuse_forest.png new file mode 100644 index 0000000000..cc033c00da Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/mx_landuse_forest.png differ diff --git a/OsmAnd/res/drawable-xhdpi/mx_landuse_grass.png b/OsmAnd/res/drawable-xhdpi/mx_landuse_grass.png new file mode 100644 index 0000000000..3871afdeae Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/mx_landuse_grass.png differ diff --git a/OsmAnd/res/drawable-xhdpi/mx_leisure_ice_rink.png b/OsmAnd/res/drawable-xhdpi/mx_leisure_ice_rink.png new file mode 100644 index 0000000000..479fa32f65 Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/mx_leisure_ice_rink.png differ diff --git a/OsmAnd/res/drawable-xhdpi/mx_military_danger_area.png b/OsmAnd/res/drawable-xhdpi/mx_military_danger_area.png new file mode 100644 index 0000000000..7663c90083 Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/mx_military_danger_area.png differ diff --git a/OsmAnd/res/drawable-xhdpi/mx_natural_beach.png b/OsmAnd/res/drawable-xhdpi/mx_natural_beach.png new file mode 100644 index 0000000000..9ee666e996 Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/mx_natural_beach.png differ diff --git a/OsmAnd/res/drawable-xhdpi/mx_natural_glacier.png b/OsmAnd/res/drawable-xhdpi/mx_natural_glacier.png new file mode 100644 index 0000000000..61da217662 Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/mx_natural_glacier.png differ diff --git a/OsmAnd/res/drawable-xhdpi/mx_natural_scrub.png b/OsmAnd/res/drawable-xhdpi/mx_natural_scrub.png new file mode 100644 index 0000000000..e88e88807d Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/mx_natural_scrub.png differ diff --git a/OsmAnd/res/drawable-xhdpi/mx_natural_swamp.png b/OsmAnd/res/drawable-xhdpi/mx_natural_swamp.png new file mode 100644 index 0000000000..d99d1d5b46 Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/mx_natural_swamp.png differ diff --git a/OsmAnd/res/drawable-xhdpi/mx_sport_billiard.png b/OsmAnd/res/drawable-xhdpi/mx_sport_billiard.png new file mode 100644 index 0000000000..fbaab74353 Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/mx_sport_billiard.png differ diff --git a/OsmAnd/res/drawable-xhdpi/mx_sport_gymnastics.png b/OsmAnd/res/drawable-xhdpi/mx_sport_gymnastics.png new file mode 100644 index 0000000000..decebbd24f Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/mx_sport_gymnastics.png differ diff --git a/OsmAnd/res/drawable-xhdpi/mx_sport_skating.png b/OsmAnd/res/drawable-xhdpi/mx_sport_skating.png new file mode 100644 index 0000000000..479fa32f65 Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/mx_sport_skating.png differ diff --git a/OsmAnd/src/net/osmand/plus/NameFinderPoiFilter.java b/OsmAnd/src/net/osmand/plus/NameFinderPoiFilter.java index 500d875458..ed68268f47 100644 --- a/OsmAnd/src/net/osmand/plus/NameFinderPoiFilter.java +++ b/OsmAnd/src/net/osmand/plus/NameFinderPoiFilter.java @@ -51,7 +51,7 @@ public class NameFinderPoiFilter extends PoiFilter { public void setQuery(String query) { this.query = query; } - + @Override protected List searchAmenities(double lat, double lon, double topLatitude, double bottomLatitude, double leftLongitude, double rightLongitude, ResultMatcher matcher) { diff --git a/OsmAnd/src/net/osmand/plus/PoiFilter.java b/OsmAnd/src/net/osmand/plus/PoiFilter.java index 1a9eb03dfc..90b2dd490d 100644 --- a/OsmAnd/src/net/osmand/plus/PoiFilter.java +++ b/OsmAnd/src/net/osmand/plus/PoiFilter.java @@ -301,9 +301,10 @@ public class PoiFilter { public String getSimplifiedId(){ if(filterId.startsWith(STD_PREFIX)) { return filterId.substring(STD_PREFIX.length()).toLowerCase(); - } else { + } else if(filterId.startsWith(USER_PREFIX)) { return filterId.substring(USER_PREFIX.length()).toLowerCase(); } + return filterId; } diff --git a/OsmAnd/src/net/osmand/plus/render/OsmandRenderer.java b/OsmAnd/src/net/osmand/plus/render/OsmandRenderer.java index 9b249fc145..711ad5598a 100644 --- a/OsmAnd/src/net/osmand/plus/render/OsmandRenderer.java +++ b/OsmAnd/src/net/osmand/plus/render/OsmandRenderer.java @@ -292,7 +292,7 @@ public class OsmandRenderer { int[] alreadyDrawnIcons = new int[iconsW * iconsH / 32]; for (IconDrawInfo icon : rc.iconsToDraw) { if (icon.resId != null) { - Bitmap ico = RenderingIcons.getIcon(context, icon.resId); + Bitmap ico = RenderingIcons.getSmallPoiIcon(context, icon.resId); if (ico != null) { if (icon.y >= 0 && icon.y < rc.height && icon.x >= 0 && icon.x < rc.width) { int z = (((int) icon.x / skewConstant) + ((int) icon.y / skewConstant) * iconsW); diff --git a/OsmAnd/src/net/osmand/plus/render/RenderingIcons.java b/OsmAnd/src/net/osmand/plus/render/RenderingIcons.java index 9b8b2d3d72..a2b484b95e 100644 --- a/OsmAnd/src/net/osmand/plus/render/RenderingIcons.java +++ b/OsmAnd/src/net/osmand/plus/render/RenderingIcons.java @@ -23,6 +23,7 @@ public class RenderingIcons { private static final Log log = PlatformUtil.getLog(RenderingIcons.class); private static Map icons = new LinkedHashMap(); + private static Map smallIcons = new LinkedHashMap(); private static Map bigIcons = new LinkedHashMap(); private static Map iconsBmp = new LinkedHashMap(); private static DisplayMetrics dm; @@ -82,6 +83,14 @@ public class RenderingIcons { return null; } + public static Bitmap getSmallPoiIcon(Context ctx, String s) { + Integer resId = smallIcons.get(s); + if (resId != null) { + return BitmapFactory.decodeResource(ctx.getResources(), resId, null); + } + return null; + } + public static Bitmap getIcon(Context ctx, String s) { if (!iconsBmp.containsKey(s)) { Integer resId = icons.get(s); @@ -115,7 +124,15 @@ public class RenderingIcons { for (Field f : cl.getDeclaredFields()) { if (f.getName().startsWith("h_") || f.getName().startsWith("mm_")) { try { - icons.put(f.getName().substring(f.getName().startsWith("mm_")? 3 : 2), f.getInt(null)); + String id = f.getName().substring(f.getName().startsWith("mm_") ? 3 : 2); + int i = f.getInt(null); + // don't override shader or map icons (h) + if(f.getName().startsWith("h_") || !icons.containsKey(id)) { + icons.put(id, i); + } + if(f.getName().startsWith("mm_")) { + smallIcons.put(id, i); + } } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalAccessException e) { diff --git a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java index 29079b2e07..802c3de8f5 100644 --- a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java @@ -191,7 +191,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon id = tag.toString(); } if(id != null){ - Bitmap bmp = RenderingIcons.getIcon(view.getContext(), id); + Bitmap bmp = RenderingIcons.getSmallPoiIcon(view.getContext(), id); if(bmp != null){ canvas.drawBitmap(bmp, x - bmp.getWidth() / 2, y - bmp.getHeight() / 2, paintIcon); }