State files previously included any layer that didn't use a local:// or file:// scheme in their URL, or any layer that didn't define our canned set of properties (url and url2). This was causing layers added from a GeoPackage to be included because GPKG feature layers use the gpkg:// scheme and GPKG tile layers do not have a URL.
We will now determine if a layer should be included by:
Gathering defined URLs from layer options using url, url2 (used by file plugins like SHP), and urls (used by tile layers).
Checking if at least one URL is defined.
All defined URL's must be a remote URL, which currently tests if the string starts with an http, https, or ftp scheme. Please comment if we should support other schemes by default or if the scheme list needs to be pluggable.
If an application/plugin uses URL properties other than the above, they may register additional properties to check with registerLayerStateUrlProperty.
State files previously included any layer that didn't use a
local://
orfile://
scheme in their URL, or any layer that didn't define our canned set of properties (url
andurl2
). This was causing layers added from a GeoPackage to be included because GPKG feature layers use thegpkg://
scheme and GPKG tile layers do not have a URL.We will now determine if a layer should be included by:
url
,url2
(used by file plugins like SHP), andurls
(used by tile layers).If an application/plugin uses URL properties other than the above, they may register additional properties to check with
registerLayerStateUrlProperty
.