Ignore:
Timestamp:
2014-08-28T09:57:36+02:00 (10 years ago)
Author:
bastiK
Message:

fixed #10421 - User-settings for mapcss mappaint styles

  • only boolean setting for now
  • no shortcut support so far
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java

    r7246 r7450  
    1818import java.util.Collections;
    1919import java.util.List;
    20 import java.util.Objects;
    2120import java.util.regex.Matcher;
    2221import java.util.regex.Pattern;
     
    645644        /**
    646645         * Get the number of tags for the current primitive.
    647          * @param env
     646         * @param env the environment
    648647         * @return number of tags
    649648         */
    650649        public static int number_of_tags(Environment env) {
    651650            return env.osm.getNumKeys();
     651        }
     652       
     653        /**
     654         * Get value of a setting.
     655         * @param env the environment
     656         * @param key setting key (given as layer identifier, e.g. setting::mykey {...})
     657         * @return the value of the setting (calculated when the style is loaded)
     658         */
     659        public static Object setting(Environment env, String key) {
     660            return env.source.settingValues.get(key);
    652661        }
    653662    }
Note: See TracChangeset for help on using the changeset viewer.