Class TLspMGCPLayerFactory
java.lang.Object
com.luciad.format.mgcp.view.lightspeed.TLspMGCPLayerFactory
- All Implemented Interfaces:
ILspLayerFactory
@LcdService(service=ILspLayerFactory.class,
priority=20001)
public final class TLspMGCPLayerFactory
extends Object
implements ILspLayerFactory
A Lightspeed Layer factory which can create layers for MGCP 2.0 compliant models.
Models are MGCP compliant when the data model descriptor has a data property "FCODE" or similar ("f-code", "fCode").
This includes models decoded by TLcdMGCPModelDecoder,
but also SHP files that have such a property.
The returned layer is configured with a scale range and
model query config in order not to overload the map.
You can change these settings directly on the returned TLspLayer.
- Base features, such as primary roads, cities, woods, and water, are always visible.
- More feature types, such as roads, rivers, and railways, become visible between the scales 1:100000 and 1:400000.
- All features are visible once users zoom in below scale 1:100000.
- Labels become visible from map scale 1:100000 upwards.
To use this factory you can consult the tutorial.
If you want to apply custom styling you can follow this guide.
- Since:
- 2020.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanCreateLayers(ILcdModel aModel) Determines whether or not this layer factory is capable of creating layers for the given model.createLayers(ILcdModel aModel) Creates one or moreILspLayerobjects for the given model.
-
Constructor Details
-
TLspMGCPLayerFactory
public TLspMGCPLayerFactory()
-
-
Method Details
-
createLayers
Description copied from interface:ILspLayerFactoryCreates one or moreILspLayerobjects for the given model. Note that this method should not be called ifILspLayerFactory.canCreateLayers(com.luciad.model.ILcdModel)returnsfalse; the results are undefined in this case. In most typical scenarios, this method will only create a singleILspLayerinstances for a given model. In such cases, theALspSingleLayerFactoryprovides a convenient abstract base class for layer factory implementations. An example of when it might be useful to return multiple layers is a model that describes objects moving along a certain trajectory. The layer factory might return one layer which represents the trajectories as polylines, and another which represents the current positions of the objects as point icons.- Specified by:
createLayersin interfaceILspLayerFactory- Parameters:
aModel- the model for which layers should be created- Returns:
- a collection of layers representing the given model
-
canCreateLayers
Description copied from interface:ILspLayerFactoryDetermines whether or not this layer factory is capable of creating layers for the given model. If this method returnsfalse, the result of callingILspLayerFactory.createLayers(com.luciad.model.ILcdModel)with the same parameters is undefined.- Specified by:
canCreateLayersin interfaceILspLayerFactory- Parameters:
aModel- the model for which layers should be created- Returns:
trueif this factory can create layers foraModel, orfalseotherwise
-