use of com.revolsys.swing.map.symbol.SymbolLibrary in project com.revolsys.open by revolsys.
the class CreateIndex method main.
public static void main(final String[] args) {
SymbolLibrary.findSymbol("maki/police");
final Resource makiFile = new UrlResource("https://www.mapbox.com/maki/www/maki.json");
final List<MapEx> symbolList = Json.toMapList(makiFile);
final SymbolLibrary symbolLibrary = new SymbolLibrary("maki", "Maki");
for (final MapEx symbolMap : symbolList) {
final String name = "maki/" + symbolMap.getString("icon");
final String title = symbolMap.getString("name");
symbolLibrary.addSymbolSvg(name, title);
}
final File symbolLibraryFile = new File("src/main/resources/META-INF/com.revolsys.swing.map.symbol.SymbolLibrary.json");
MapObjectFactory.write(symbolLibraryFile, symbolLibrary);
final SymbolLibrary symbolLibrary2 = MapObjectFactory.toObject(symbolLibraryFile);
}
use of com.revolsys.swing.map.symbol.SymbolLibrary in project com.revolsys.open by revolsys.
the class CreateIndex method main.
public static void main(final String[] args) {
SymbolLibrary.findSymbol("maki/police");
final File makiFile = new File("../maki/_includes/maki.json");
final List<MapEx> symbolList = Json.toMapList(makiFile);
final SymbolLibrary symbolLibrary = new SymbolLibrary("maki", "Maki");
for (final MapEx symbolMap : symbolList) {
final String name = "maki/" + symbolMap.getString("icon");
final String title = symbolMap.getString("name");
symbolLibrary.addSymbolSvg(name, title);
}
final File symbolLibraryFile = new File("src/main/resources/META-INF/com.revolsys.swing.map.symbol.SymbolLibrary.json");
MapObjectFactory.write(symbolLibraryFile, symbolLibrary);
final SymbolLibrary symbolLibrary2 = MapObjectFactory.toObject(symbolLibraryFile);
System.out.println(symbolLibrary2);
}
Aggregations