src/main/java/de/blau/android/layer/Util.java
/**
     * Add an imagery layer on top of the latest layer of the same type
     * 
     * @param db the pref database
     * @param layerConfigs the current layer config
     * @param isOverlay if true this is an overlay
     * @param id the layer id
     */
Add an imagery layer on top of the latest layer of the same type

@param db the pref database
@param layerConfigs the current layer config
@param isOverlay if true this is an overlay
@param id the layer id
Add an imagery layer on top of the latest layer of the same type @param db the pref database @param layerConfigs the current layer config @param isOverlay if true this is an overlay @param id the layer id
public static void addImageryLayer(@NonNull final AdvancedPrefDatabase db, @NonNull final LayerConfig[] layerConfigs, boolean isOverlay,
            @NonNull final String id) {
        final LayerType layerType = isOverlay ? LayerType.OVERLAYIMAGERY : LayerType.IMAGERY;
        int position = 0;
        for (LayerConfig config : layerConfigs) {
            if (layerType.equals(config.getType()) && config.getPosition() >= position) {
                position = config.getPosition() + 1;
            }
        }
        db.insertLayer(position, layerType, true, id);
    }
public static void addImageryLayer ( @ NonNull final AdvancedPrefDatabase db , @ NonNull final LayerConfig [ ] layerConfigs , boolean isOverlay , @ NonNull final String id ) { final LayerType layerType = isOverlay ? LayerType . OVERLAYIMAGERY : LayerType . IMAGERY ; int position = 0 ; for ( LayerConfig config : layerConfigs ) { if ( layerType . equals ( config . getType ( ) ) && config . getPosition ( ) >= position ) { position = config . getPosition ( ) + 1 ; } } db . insertLayer ( position , layerType , true , id ) ; }
Add an imagery layer on top of the latest layer of the same type
Add an imagery layer on top of the latest layer of the same type