Package com.luciad.view.lightspeed.scale
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 Summary
Modifier and TypeMethodDescriptionvoid
Registers a map scale change listener.static ILspMapScaleProvider
fromView()
AnILspMapScaleProvider
that takes the map scale directly from the view.getMapScale
(ILspView aView) Returns the current map scale for a view.void
Unregisters a map scale change listener.
-
Method Details
-
fromView
AnILspMapScaleProvider
that takes the map scale directly from the view. The map scale is taken atprojection center
. -
getMapScale
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
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
Unregisters a map scale change listener.- Parameters:
aListener
- the map scale listener to remove
-