Interface ILspMapScaleProvider


public interface ILspMapScaleProvider

An ILspMapScaleProvider provides the map scale of a view and can keep listening objects updated of any changes to the map scale.

An implementation of this interface can be used to control scale-based styling in a custom way. More information can be found in the map scale provider howto.

Implementations of this class must ensure thread safety, as any of its methods can be called from any thread.

Since:
2022.0
  • Method Details

    • fromView

      static ILspMapScaleProvider fromView()
      An ILspMapScaleProvider that takes the map scale directly from the view. The map scale is taken at projection center.
    • getMapScale

      TLcdMapScale getMapScale(ILspView aView)
      Returns the current map scale for a view.
      Parameters:
      aView - the view that is being rendered.
      Returns:
      a map scale. Must not be null.
    • addMapScaleChangeListener

      void addMapScaleChangeListener(ILspMapScaleChangeListener aListener)
      Registers a map scale change listener. Events will be passed to the listener when the map scale changes according to this map scale provider.
      Parameters:
      aListener - the map scale listener to add
    • removeMapScaleChangeListener

      void removeMapScaleChangeListener(ILspMapScaleChangeListener aListener)
      Unregisters a map scale change listener.
      Parameters:
      aListener - the map scale listener to remove