new CartoSql()
Create an instance of CartoSql
Extends
- ol.format.Feature
Methods
-
<static> createSql(options)
-
Create a Carto SQL API query. If a select clause is provided it must include a wkt_geom column.
Parameters:
Name Type Description options
module:nyc/ol/format/CartoSql~CartoSql.Options Options
- Source:
Returns:
SQL statement
- Type
- string
-
getLastExtent()
-
Get the extent from the source of the last readFeatures call
- Source:
Returns:
The extent
- Type
- ol.Extent
-
getType()
-
Return format type
- Source:
Returns:
The format type
- Type
- ol.format.FormatType
-
readFeature(source)
-
Read a single feature from a source
Parameters:
Name Type Description source
Object A row from a Carto SQL data source
- Source:
Returns:
Feature
- Type
- ol.Feature
-
readFeatures(source)
-
Read all features from a source
Parameters:
Name Type Description source
string Response from a Carto SQL data source
- Source:
Returns:
Features
- Type
- Array.<ol.Feature>
-
readProjection(source)
-
Read the projection from a source
Parameters:
Name Type Description source
Document | Node | Object | string Source
- Source:
Returns:
The projection
- Type
- ol.proj.Projection
Type Definitions
-
Options
-
Options for module:nyc/ol/format/CartoSql~CartoSql#createSql
Type:
- Object
- Source:
Properties:
Name Type Argument Description select
string <optional>
The SQL select clause
from
string The SQL from clause
where
string <optional>
The SQL where clause