Support for Google Spreadsheets, PostgreSQL and KML as thematic data source; log-in in Google Spreadsheets; usage of ion and Bing access token; KML visualization; and more
IMPORTANT CHANGES
-
Google Fusion Tables will be unavailable after Dec 3, 2019. It is recommended to backup thematic data stored in such tables locally/offline or using alternative cloud services. Please refer to Google announcements for more information.
-
In this context, besides Google Fusion Tables, the Web Client is now additionally capable of fetching data using Google Sheets API v4 and a PostgreSQL database with a RESTful API enabled (PostgREST). Like with Google Fusion Tables, data fetched from Google Sheets API and PostgREST can also be displayed on the infobox as thematic data when a city object is clicked. Simply enter the URL to corresponding tables in the
thematicDataUrl
field as well as the type of thematic data source in> Thematic Data Source
field inShow / Hide Toolbox
->Add / Configure Layer
. This could be:- The spreadsheet URL using
Google Sheets API
, e.g. with the following structurehttps://docs.google.com/spreadsheets/d/<spreadsheet_id>
- The table URL published by the
PostgreSQL REST API
, e.g.https://example.com:3000/<table_name>
- The spreadsheet URL using
-
In addition to the two new supported data sources, it is now also possible to choose their
tableType
betweenAll object attributes in one row
(horizontal) andOne row per object attribute
(vertical). The selected table type are encoded in URLs generated byGenerate Scene Link
as well as parsing project URLs, see05e692d
, where:-
Horizontal: all object attributes are stored in columns of one single row, which means each ID occurs only once in the table.
Note: The thematic data must be stored in the first sheet of the spreadsheet. The first column of this sheet must be called
gmlid
orGMLID
.Example:
gmlid attribute1 attribute2 attribute3 attribute4 gmlid1 value1 value2 value3 value4 gmlid2 value1 value2 value3 value4 -
Vertical: each object attribute is stored in one row consisting of three columns
ID
,Attribute
andValue
, which means an ID may occur in multiple rows in the table.Note: A vertical table must contain exactly 3 columns in this exact order:
gmlid
,attribute
andvalue
.Example:
gmlid attribute value gmlid1 attribute1 value1 gmlid1 attribute2 value2 gmlid1 attribute3 value3 gmlid1 attribute4 value4 gmlid2 attribute1 value1 gmlid2 attribute2 value2 gmlid2 attribute3 value3 gmlid2 attribute4 value4 -
The response from PostgREST service is encoded in JSON with the following structure:
Both the horizontal and vertical mode consist of an array of records marked by the[ ... ]
.
Each record represents a line in the table, where:-
Each record in vertical mode only has exactly 3 elements:
gmlid
, attribute name and attribute value. Thegmlids
here can be duplicated in other records, but the combination of the first two columns must be unique.[ { "gmlid" : "id1", "attribute" : "value_name", "value" : "value" }, { "gmlid" : "id2", "attribute" : "value_name", "value" : "value" }, ... ]
-
On the other hand, each record in the horizontal mode can have more than 2 elements, but the first one must always be
gmlid
and this must be unique for each record.
-
-
NEW
-
Added own parser for thematic
SchemaData
(see1e78886
) besides simpleData
in KML covered inv1.8.3
:- An example of a KML document with thematic
SchemaData
:
... <Placemark> ... <ExtendedData> <SchemaData schemaUrl="#some_schema"> <SimpleData name="A">Text</SimpleData> <SimpleData name="B">Text</SimpleData> </SchemaData> </ExtendedData> </Placemark>
-
Note that the parser will not check the structural validity of the used
SchemaData
. This should be ensured by the provider. -
The thematic data are found using the IDs of the placemarks in the KML file. If the placemarks do not have IDs, their
name
will be used for lookup instead, see95b5086
.
- An example of a KML document with thematic
-
URLs in the thematic info table (when an object has been clicked) are now clickable, see
dab83ee
and3dc8d33
. -
Added support for retrieving and displaying thematic datasource from KML documents themselves (see
d0e82ad
). Note that:- The option
> Thematic Data Source
in the main toolbox must be set toKML documents
; - If Cesium is used to retrieve thematic data from KML documents, only
Data
ofExtendedData
is allowed.SchemaData
or custom data are simply ignored by Cesium, see here; - An example of a KML document with thematic data:
... <Placemark> ... <ExtendedData> <Data name="dataName"> <displayName></displayName> <value></value> </Data> </ExtendedData> </Placemark>
- If the
Data
elements do not havedisplayName
, the attributename
shall be used as label instead.
- The option
-
Added support for loading KML/COLLADA/glTF layers via proxy (see
c736ba7
and4894ca4
):- This can be toggled in the main toolbox while adding new layer;
- This shall be stored in the shared URLs as parameter
layerProxy=<true|false>
; - For backward compatibility, shared URLs without this parameter shall receive the default value
false
. - It is not recommended to load large datasets via proxy, e.g. Cesium 3D Tiles;
- Proxy only works for web client hosted in one of the following domains:
http(s)://(www.)3dcitydb.[org|net|de]
; - Users have to ensure the resource URL and the web client's URL have the same protocol HTTP/HTTPS.
-
Added support for clamping KML models to ground (see
c736ba7
andf64372c
):- This can be toggled in the main toolbox while adding new layer;
- This shall be stored in the shared URLs as parameter
layerClampToGround=<true|false>
; - For backward compatibility, shared URLs without this parameter shall receive the default value
true
.
-
It is now possible to access own private/non-public Google Spreadsheets using OAuth, see
082145c
. The following steps explain how to enable OAuth for your project and use it in the Web Client (this is not the requirement of the web client, but rather a standard procedure when using OAuth):- Make sure you really have read/write access to the table;
- Register your project using Google Developer Console;
- Search and activate Google Sheets API for your project;
- Create and copy your client ID from the credentials page;
- Insert the trusted redirect URIs,
or the URIs in which the web client is running. For example if you are using the latest web client from our 3DCityDB server,
then you should insert the following URI:
https://www.3dcitydb.org/3dcitydb-web-map/latest/3dwebclient/index.html
- Paste your client ID in the web client's URL using the parameter
googleClientId
, such as
https://www.3dcitydb.org/3dcitydb-web-map/latest/3dwebclient/index.html?googleClientId=<YOUR_CLIENT_ID>
- You can then log into Google by clicking the button marked with a key symbol, which can be found in the top right area of the screen;
- When logged in, you can click the button again to log out;
- If the parameter
googleClientId
does not exist in the client URL, then this button shall not be displayed (backward compatible to earlier versions of the web client).
- (Optional) You can share your project as usual by clicking the button
Generate Scene Link
. You need to stay logged in to attach your client ID in the project share link. If you wish to not include your client ID in the project share link, then simply log out beforehand, seebd99b17
.
-
The web client now supports both
.gltf
and binary.glb
files. It automatically detects for each individual object whether a.gltf
or a.glb
is present and visualize accordingly, i.e. the web client can visualize a list of files mixed with.gltf
and.glb
, see737b4a0
.
CHANGES
-
The
SplashController
has been refactored to be a separate class for modular use (seee7a5a74
). -
Added a URL controller to export and parse project URLs (see
ff07d0c
andf076322
):- The URL parameters and its values are now kept compact;
- For the list of the abbreviations used for the URL parameters, please refer to this list:
- Backwards compatibility is enabled to also parse URLs generated from older versions;
- To convert older URLs to newer ones, simply open them using the newest version of the 3DCityDB Web Map Client and then export the scene link again.
-
Added support for
thematicDataSource
in URLs generated byGenerate Scene Link
as well as parsing project URLs, see85afb36
.
FIXES
-
Fixed handling of ion and Bing token (see
52aa4f9
):- An ion access token is required for the Cesium World Terrain, please refer to Cesium to acquire this access token.
- A Bing access token is required for all Bing Maps, please refer to Microsoft to acquire this access token.
- Both the tokens can be inserted in the project URL using the following parameters
&ionToken=<your_token>
(or short&it=<your_token>
) for the Cesium World Terrain&bingToken=<your_token>
(or short&bt=<your_token>
) for all Bing Maps
- NOTE: Cesium ion uses Bing Imagery by default, which means you do not need to provide a Bing access token if an ion access token is already available. On the other hand, a Bing access token alone does not suffice. It requires an ion access token additionally.
-
Fixed loading data sources when table type (vertical/horizontal) has been changed, see
670c4c5
. -
Fixed loading options of data sources, see
df2c1f2
. -
Fixed a bug that prevented loading of Cesium 3D Tiles, see
9966228
. -
Fixed a bug that prevented calendar
flatpickr
from displaying correctly, see942d9f1
. -
Fixed querying data sources from multiple layers, see
69fce7b
. -
Fixed loading of thematic data sources in Cesium 3D Tiles, see
08bc00d
. -
Fixed a bug that prevented Geocoder to function properly on defined active layers, see
0e60059
.