The majority of formats require the same two steps for visualization on a GXY view. To visualize MGCP data:
//First create the model ILcdModelDecoder decoder = new TLcdCompositeModelDecoder(TLcdServiceLoader.getInstance(ILcdModelDecoder.class)); ILcdModel model = decoder.decode(sourceName); ILcdGXYLayer layer = new TLcdMGCPGXYLayerFactory().createGXYLayer(model); //Wrap the layer with an async layer wrapper to ensure //that the view remains responsive while data is being painted layer = ILcdGXYAsynchronousLayerWrapper.create(layer); //Add the async layer to the GXY view (an ILcdGXYView) view.addGXYLayer(layer);
The model decoder class that is actually responsible for decoding MGCP data is the
This results in an MGCP layer configured with a scale range and model query configuration, to prevent an overload of the map with features.
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.
See Visualizing Vector Data for more information about visualizing and styling vector data.
The MGCP standard is primarily intended for maps printed on paper. It uses transparent colors and fill patterns for several features. In a LuciadLightspeed application, the map background color may filter through the feature colors as a result. Therefore, it is recommended to apply a white background color to your map view.
To set a white background in a GXY view:
You may want to update the images for the navigation controls, because they are barely visible on a white background.