This sample shows how to load and visualize data from the various data formats and web services supported by LuciadRIA. Support is included for GeoJson, GML, KML, OGC 3D Tiles, OGC WFS, OGC WMS, OGC WMTS, LTS, Azure Maps, HERE Maps, Google Maps, Mapbox Vector Tiles, HSPC, and OpenStreetMap tile services.
Each format has a sample snippet file on how to load the specific data
format. See the files named
*DataLoader.js
.
Use a
GeoJsonCodec
in your
Store
.
Use a
FeaturePainter
to style your data using properties in the GeoJson file.
GML 3.2 data, that adheres to the Simple Feature profile (SF-0).
Use a
GMLCodec
in your
Store
.
Use a
FeaturePainter
to style your data using properties in the GML file.
OGC KML 2.2 data
Use a
KMLModel
with a
KMLLayer
.
Use a
WFSFeatureStore
with the appropriate codec (
GeoJsonCodec
,
GMLCodec
or a custom codec).
Use a
FeaturePainter
to style your data using properties in the WFS response.
When using a WFS server, you can optionally specify an OGC filter as
your layer
query
that is passed along in the WFS request.
WFS data is automatically loading using
LoadSpatially
, but you can override it to
LoadEverything
.
WFS data can only be loaded if the WFS Server allows cross domain
requests.
For more information about setting up CORS for OGC WFS web services in
LuciadFusion, see
Using WFS in a Rich Internet Application (RIA).
When the sample connects to a WFS service, it uses
isTransactional(capabilities)
to detect whether the service supports WFS-T. If it does, the layer is created with
editable: true.
Click a feature to start editing, drag its geometry, and the changes are sent back to the server as WFS-T
put transactions.
If the service is not transactional, features remain selectable but cannot be edited.
A transactional service is also checked with isAutoLocking(capabilities), which looks
for the WFS 2.0 AutomaticDataLocking constraint. If the server does not advertise it,
the sample locks a feature explicitly (lockFeatures) before an edit session starts, and
commits with that lock (put/remove with a lock option) instead
of the default unlocked path.
This sample uses
https://sampleservices.luciad.com/wfs
as WSF service, which runs on a LuciadFusion server. This service is for
demonstration purposes only. You can use this service only for simple
tests and demonstrations. You should not rely on this service in any
way.
With the Tiled option you can choose whether to retrieve the data as a collection of tiles, or as a single image.
WMSTileSetModel
with
WMSTileSetLayer
.
WMSImageModel
with
WMSImageLayer
.
This sample has a controller (
FeatureInfoController
) that will highlight a WMS feature on mouse over, and will shows its
properties in a balloon on select.
This sample uses
https://sampleservices.luciad.com/wms
as WMS service, which runs on a LuciadFusion server. This service is for
demonstration purposes only. You can use this service only for simple
tests and demonstrations. You should not rely on this service in any
way.
See the sample code
WMTSTileSetModel
, in combination with
RasterTileSetLayer
.
This sample uses
https://sampleservices.luciad.com/wmts
as WMTS service, which runs on a LuciadFusion server. This service is
for demonstration purposes only. You can use this service only for
simple tests and demonstrations. You should not rely on this service in
any way.
Use
AzureMapsTileSetModel
with
RasterTileSetLayer
.
Use
HereMapsTileSetModel
with
RasterTileSetLayer
.
Use
GoogleMapsTileSetModel
with
RasterTileSetLayer
.
Use
FusionTileSetModel
with
RasterTileSetLayer
.
You can load imagery data as well as elevation data.
Elevation data has no effect in a 2D map.
This sample uses
https://sampleservices.luciad.com/lts
as LuciadFusion service, which runs on a LuciadFusion server. This
service is for demonstration purposes only. You can use this service
only for simple tests and demonstrations. You should not rely on this
service in any way.
Use
OGC3DTilesModel
with
Tileset3DLayer
.
You can load 3D tiled mesh data (In B3DM/GLB/glTF format) as well as Point Cloud
data (In PNTS format). The Marseille 3D mesh data used in this sample
has been created by Airbus with Airbus Street Factory.
Sometimes data density can be lower or higher than reported. Do not
hesitate to manipulate the quality factor to find the right balance
between precision and performance.
Use
OGC3DTilesModel
with
Tileset3DLayer
.
You can load Google 3D Tiles mesh data (in the GLB format) if you have a
valid Google API key.
Google 3D Tiles is supported on a 3D map only.
The resolution of the tiles received through the Google Map Tiles API may
provide the tiles at a lower resolution than what you can experience on
Google products (like Google Earth).
This sample uses
https://sampleservices.luciad.com/ogc/3dtiles
as OGC 3D Tiles service, which runs on a LuciadFusion server. This
service is for demonstration purposes only. You can use this service
only for simple tests and demonstrations. You should not rely on this
service in any way.
Use
HSPCTilesModel
with
Tileset3DLayer
.
You can load point cloud data in the HSPC format with this API.
The default quality factor might not be perfect for every dataset. Do
not hesitate to manipulate the quality factor to find the right balance
between precision and performance.
Use
UrlTileSetModel
with
RasterTileSetLayer
.
You can load imagery from OSM tile services with this API.
Use
MapboxVectorTileSetModel and MapboxStyle
with
MapboxVectorTileSetLayer
.