Update icons
BIN
OsmAnd/res/drawable-hdpi/mx_amenity_food_court.png
Normal file
After Width: | Height: | Size: 858 B |
BIN
OsmAnd/res/drawable-hdpi/mx_amenity_grave_yard.png
Normal file
After Width: | Height: | Size: 693 B |
BIN
OsmAnd/res/drawable-hdpi/mx_landuse_cemetery.png
Normal file
After Width: | Height: | Size: 693 B |
BIN
OsmAnd/res/drawable-hdpi/mx_landuse_forest.png
Normal file
After Width: | Height: | Size: 816 B |
BIN
OsmAnd/res/drawable-hdpi/mx_landuse_grass.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
OsmAnd/res/drawable-hdpi/mx_leisure_ice_rink.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-hdpi/mx_military_danger_area.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
OsmAnd/res/drawable-hdpi/mx_natural_beach.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
OsmAnd/res/drawable-hdpi/mx_natural_glacier.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
OsmAnd/res/drawable-hdpi/mx_natural_scrub.png
Normal file
After Width: | Height: | Size: 848 B |
BIN
OsmAnd/res/drawable-hdpi/mx_natural_swamp.png
Normal file
After Width: | Height: | Size: 838 B |
BIN
OsmAnd/res/drawable-hdpi/mx_sport_billiard.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
OsmAnd/res/drawable-hdpi/mx_sport_gymnastics.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
OsmAnd/res/drawable-hdpi/mx_sport_skating.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-mdpi/mx_amenity_food_court.png
Normal file
After Width: | Height: | Size: 575 B |
BIN
OsmAnd/res/drawable-mdpi/mx_amenity_grave_yard.png
Normal file
After Width: | Height: | Size: 592 B |
BIN
OsmAnd/res/drawable-mdpi/mx_landuse_cemetery.png
Normal file
After Width: | Height: | Size: 592 B |
BIN
OsmAnd/res/drawable-mdpi/mx_landuse_forest.png
Normal file
After Width: | Height: | Size: 499 B |
BIN
OsmAnd/res/drawable-mdpi/mx_landuse_grass.png
Normal file
After Width: | Height: | Size: 666 B |
BIN
OsmAnd/res/drawable-mdpi/mx_leisure_ice_rink.png
Normal file
After Width: | Height: | Size: 913 B |
BIN
OsmAnd/res/drawable-mdpi/mx_military_danger_area.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-mdpi/mx_natural_beach.png
Normal file
After Width: | Height: | Size: 753 B |
BIN
OsmAnd/res/drawable-mdpi/mx_natural_glacier.png
Normal file
After Width: | Height: | Size: 750 B |
BIN
OsmAnd/res/drawable-mdpi/mx_natural_scrub.png
Normal file
After Width: | Height: | Size: 571 B |
BIN
OsmAnd/res/drawable-mdpi/mx_natural_swamp.png
Normal file
After Width: | Height: | Size: 533 B |
BIN
OsmAnd/res/drawable-mdpi/mx_sport_billiard.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
OsmAnd/res/drawable-mdpi/mx_sport_gymnastics.png
Normal file
After Width: | Height: | Size: 804 B |
BIN
OsmAnd/res/drawable-mdpi/mx_sport_skating.png
Normal file
After Width: | Height: | Size: 913 B |
BIN
OsmAnd/res/drawable-xhdpi/mx_amenity_food_court.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
OsmAnd/res/drawable-xhdpi/mx_amenity_grave_yard.png
Normal file
After Width: | Height: | Size: 746 B |
BIN
OsmAnd/res/drawable-xhdpi/mx_landuse_cemetery.png
Normal file
After Width: | Height: | Size: 746 B |
BIN
OsmAnd/res/drawable-xhdpi/mx_landuse_forest.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
OsmAnd/res/drawable-xhdpi/mx_landuse_grass.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-xhdpi/mx_leisure_ice_rink.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
OsmAnd/res/drawable-xhdpi/mx_military_danger_area.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
OsmAnd/res/drawable-xhdpi/mx_natural_beach.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-xhdpi/mx_natural_glacier.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-xhdpi/mx_natural_scrub.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
OsmAnd/res/drawable-xhdpi/mx_natural_swamp.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
OsmAnd/res/drawable-xhdpi/mx_sport_billiard.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
OsmAnd/res/drawable-xhdpi/mx_sport_gymnastics.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-xhdpi/mx_sport_skating.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
|
@ -51,7 +51,7 @@ public class NameFinderPoiFilter extends PoiFilter {
|
||||||
public void setQuery(String query) {
|
public void setQuery(String query) {
|
||||||
this.query = query;
|
this.query = query;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<Amenity> searchAmenities(double lat, double lon, double topLatitude,
|
protected List<Amenity> searchAmenities(double lat, double lon, double topLatitude,
|
||||||
double bottomLatitude, double leftLongitude, double rightLongitude, ResultMatcher<Amenity> matcher) {
|
double bottomLatitude, double leftLongitude, double rightLongitude, ResultMatcher<Amenity> matcher) {
|
||||||
|
|
|
@ -301,9 +301,10 @@ public class PoiFilter {
|
||||||
public String getSimplifiedId(){
|
public String getSimplifiedId(){
|
||||||
if(filterId.startsWith(STD_PREFIX)) {
|
if(filterId.startsWith(STD_PREFIX)) {
|
||||||
return filterId.substring(STD_PREFIX.length()).toLowerCase();
|
return filterId.substring(STD_PREFIX.length()).toLowerCase();
|
||||||
} else {
|
} else if(filterId.startsWith(USER_PREFIX)) {
|
||||||
return filterId.substring(USER_PREFIX.length()).toLowerCase();
|
return filterId.substring(USER_PREFIX.length()).toLowerCase();
|
||||||
}
|
}
|
||||||
|
return filterId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -292,7 +292,7 @@ public class OsmandRenderer {
|
||||||
int[] alreadyDrawnIcons = new int[iconsW * iconsH / 32];
|
int[] alreadyDrawnIcons = new int[iconsW * iconsH / 32];
|
||||||
for (IconDrawInfo icon : rc.iconsToDraw) {
|
for (IconDrawInfo icon : rc.iconsToDraw) {
|
||||||
if (icon.resId != null) {
|
if (icon.resId != null) {
|
||||||
Bitmap ico = RenderingIcons.getIcon(context, icon.resId);
|
Bitmap ico = RenderingIcons.getSmallPoiIcon(context, icon.resId);
|
||||||
if (ico != null) {
|
if (ico != null) {
|
||||||
if (icon.y >= 0 && icon.y < rc.height && icon.x >= 0 && icon.x < rc.width) {
|
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);
|
int z = (((int) icon.x / skewConstant) + ((int) icon.y / skewConstant) * iconsW);
|
||||||
|
|
|
@ -23,6 +23,7 @@ public class RenderingIcons {
|
||||||
private static final Log log = PlatformUtil.getLog(RenderingIcons.class);
|
private static final Log log = PlatformUtil.getLog(RenderingIcons.class);
|
||||||
|
|
||||||
private static Map<String, Integer> icons = new LinkedHashMap<String, Integer>();
|
private static Map<String, Integer> icons = new LinkedHashMap<String, Integer>();
|
||||||
|
private static Map<String, Integer> smallIcons = new LinkedHashMap<String, Integer>();
|
||||||
private static Map<String, Integer> bigIcons = new LinkedHashMap<String, Integer>();
|
private static Map<String, Integer> bigIcons = new LinkedHashMap<String, Integer>();
|
||||||
private static Map<String, Bitmap> iconsBmp = new LinkedHashMap<String, Bitmap>();
|
private static Map<String, Bitmap> iconsBmp = new LinkedHashMap<String, Bitmap>();
|
||||||
private static DisplayMetrics dm;
|
private static DisplayMetrics dm;
|
||||||
|
@ -82,6 +83,14 @@ public class RenderingIcons {
|
||||||
return null;
|
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) {
|
public static Bitmap getIcon(Context ctx, String s) {
|
||||||
if (!iconsBmp.containsKey(s)) {
|
if (!iconsBmp.containsKey(s)) {
|
||||||
Integer resId = icons.get(s);
|
Integer resId = icons.get(s);
|
||||||
|
@ -115,7 +124,15 @@ public class RenderingIcons {
|
||||||
for (Field f : cl.getDeclaredFields()) {
|
for (Field f : cl.getDeclaredFields()) {
|
||||||
if (f.getName().startsWith("h_") || f.getName().startsWith("mm_")) {
|
if (f.getName().startsWith("h_") || f.getName().startsWith("mm_")) {
|
||||||
try {
|
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) {
|
} catch (IllegalArgumentException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} catch (IllegalAccessException e) {
|
} catch (IllegalAccessException e) {
|
||||||
|
|
|
@ -191,7 +191,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
|
||||||
id = tag.toString();
|
id = tag.toString();
|
||||||
}
|
}
|
||||||
if(id != null){
|
if(id != null){
|
||||||
Bitmap bmp = RenderingIcons.getIcon(view.getContext(), id);
|
Bitmap bmp = RenderingIcons.getSmallPoiIcon(view.getContext(), id);
|
||||||
if(bmp != null){
|
if(bmp != null){
|
||||||
canvas.drawBitmap(bmp, x - bmp.getWidth() / 2, y - bmp.getHeight() / 2, paintIcon);
|
canvas.drawBitmap(bmp, x - bmp.getWidth() / 2, y - bmp.getHeight() / 2, paintIcon);
|
||||||
}
|
}
|
||||||
|
|