src/main/java/de/blau/android/osm/Wiki.java
/**
     * Display the map features wiki page for a PresetItem
     * 
     * If it finds a valid url it will cache it in the PresetItem
     * 
     * @param context the calling Android Activity
     * @param prefs a Preferences instance
     * @param p the PresetItem
     */
Display the map features wiki page for a PresetItem

If it finds a valid url it will cache it in the PresetItem

@param context the calling Android Activity
@param prefs a Preferences instance
@param p the PresetItem
Display the map features wiki page for a PresetItem If it finds a valid url it will cache it in the PresetItem @param context the calling Android Activity @param prefs a Preferences instance @param p the PresetItem
@NonNull
    public static void displayMapFeatures(@NonNull final Context context, @NonNull final Preferences prefs, @Nullable final PresetItem p) {
        String url = null;
        if (p != null) {
            url = p.getMapFeatures();
            if (url != null && !url.startsWith(Schemes.HTTP)) {
                url = getUrl(context, prefs, url);
                if (url != null) {
                    p.setMapFeatures(url); 
                }
            }
        }
        if (url == null) {
            url = getUrl(context, prefs, MAP_FEATURES);
        }
        if (url != null) {
            try {
                context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
            } catch (Exception ex) {
                Log.d(DEBUG_TAG, url + " is a invalid map feature url");
            }
        }
    }
@ NonNull public static void displayMapFeatures ( @ NonNull final Context context , @ NonNull final Preferences prefs , @ Nullable final PresetItem p ) { String url = null ; if ( p != null ) { url = p . getMapFeatures ( ) ; if ( url != null && ! url . startsWith ( Schemes . HTTP ) ) { url = getUrl ( context , prefs , url ) ; if ( url != null ) { p . setMapFeatures ( url ) ; } } } if ( url == null ) { url = getUrl ( context , prefs , MAP_FEATURES ) ; } if ( url != null ) { try { context . startActivity ( new Intent ( Intent . ACTION_VIEW , Uri . parse ( url ) ) ) ; } catch ( Exception ex ) { Log . d ( DEBUG_TAG , url + " is a invalid map feature url" ) ; } } }
Display the map features wiki page for a PresetItem
Display the map features wiki page for a PresetItem
// build full url from wiki page name, locale or language and check if it exists // cache full url