Class MapService

java.lang.Object
org.openremote.manager.map.MapService
All Implemented Interfaces:
org.openremote.model.ContainerService

public class MapService extends Object implements org.openremote.model.ContainerService
  • Field Details

  • Constructor Details

    • MapService

      public MapService()
  • Method Details

    • saveMapConfig

      public com.fasterxml.jackson.databind.node.ObjectNode saveMapConfig(org.openremote.model.manager.MapConfig mapConfiguration) throws RuntimeException
      Throws:
      RuntimeException
    • getMetadata

      protected static MapService.Metadata getMetadata(Connection connection)
    • closeQuietly

      protected static void closeQuietly(PreparedStatement query, ResultSet result)
    • init

      public void init(org.openremote.model.Container container) throws Exception
      Specified by:
      init in interface org.openremote.model.ContainerService
      Throws:
      Exception
    • start

      public void start(org.openremote.model.Container container) throws Exception
      Specified by:
      start in interface org.openremote.model.ContainerService
      Throws:
      Exception
    • setData

      public Path setData(boolean skipCustom)
      Connects to mbtiles DB and loads metadata
      Returns:
      Path of connected mbtiles file
      Throws:
      IOException
      ClassNotFoundException
      SQLException
      NullPointerException
    • stop

      public void stop(org.openremote.model.Container container) throws Exception
      Specified by:
      stop in interface org.openremote.model.ContainerService
      Throws:
      Exception
    • getMapSettings

      public com.fasterxml.jackson.databind.node.ObjectNode getMapSettings(String realm, URI host)
      Dynamically build Mapbox GL settings based on mapsettings.json
    • getMapSettingsJs

      public com.fasterxml.jackson.databind.node.ObjectNode getMapSettingsJs(String realm, URI host)
      Dynamically build Mapbox JS settings based on mapsettings.json
    • getMapTile

      public byte[] getMapTile(int zoom, int column, int row)
    • saveUploadedFile

      public void saveUploadedFile(String filename, InputStream fileInputStream) throws IOException, IllegalArgumentException
      Throws:
      IOException
      IllegalArgumentException
    • deleteUploadedFile

      public void deleteUploadedFile() throws IOException
      Throws:
      IOException
    • saveMapMetadata

      public void saveMapMetadata(MapService.Metadata metadata)
    • getCustomMapInfo

      public com.fasterxml.jackson.databind.node.ObjectNode getCustomMapInfo() throws IOException
      Throws:
      IOException