> Hi programmers,
>
> I found quite a lot of places in mkgmap source with a block like below.
> I'd prefer to put this into a static method like
>    public static Style readStyle(Properties props)
> in the StyleImpl class.
> Any reasons why that wasn't done until now?
>
>               String loc = props.getProperty("style-file");
>               if (loc == null)
>                       loc = props.getProperty("map-features");
>               String name = props.getProperty("style");
>
>               if (loc == null && name == null)
>                       name = "default";
>
>               try {
>                       this.style = new StyleImpl(loc, name);
>                       this.style.applyOptionOverride(props);
>
>               } catch (SyntaxException e) {
>                       System.err.println("Error in style: " + e.getMessage());
>                       throw new ExitException("Could not open style " + name);
>               } catch (FileNotFoundException e) {
>                       String name1 = (name != null)? name: loc;
>                       throw new ExitException("Could not open style " + 
> name1);
>               }
>
>
> Gerd

Hi Gerd,

just do it :-)

WanMil

_______________________________________________
mkgmap-dev mailing list
[email protected]
http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to