[mkgmap-dev] Question reg. StyleImpl
From WanMil wmgcnfg at web.de on Thu Apr 11 19:15:44 BST 2013
> 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
- Previous message: [mkgmap-dev] Question reg. StyleImpl
- Next message: [mkgmap-dev] levels vs. resolution
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list