SMap_Layer_OGR __construct(
SMap
$map, integer
$id
)
|
|
Construct the layer
Each layer should have a unique ID
Parameters:
|
object |
$map: |
|
|
integer |
$id: |
This layer's ID |
Redefinition of:
- SMap_Layer::__construct()
- Construct the layer
void addFiles(
array
$files
)
|
|
Add a set of files as a datasource
The array is integer indicies and string file names. The files are organized such that each index is the maximum zoom level which the datasource should be applied at.
If you save different resolutions of your vector files you can prevent the drawing of too much or too little detail as needed.
Parameters:
|
array |
$files: |
List of files and zoom levels |
void appendLayerByName(
string
$layerName
)
|
|
Appends a layer by name
Parameters:
|
string |
$layerName: |
Layer name |
void appendLayerBySQL(
string
$sql
)
|
|
Appends a layer by SQL
Actually just queues the SQL statement until the actual objects are requested in order to implement spatial filtering.
Parameters:
void createObjects(
SMap_View
$view, array
$B, integer
$adjX, integer
$adjY, array
&$objs
)
|
|
Get the objects to be rendered
Parameters:
|
object The |
$view: |
view |
|
array |
$B: |
Tile bounds |
|
integer |
$adjX: |
Bounds moved in X dir |
|
integer |
$adjY: |
Bonuds moved in Y dir |
|
array |
&$objs: |
Dump objects here |
API Tags:
resource createSFilter(
$B,
$adjX,
$adjY
)
|
|
Make the spatial filter
Parameters:
API Tags:
| Return: | OGR geometry |
| Access: | protected |
Open the datasource
API Tags:
void fetchLayer(
SMap_View
$view, array
$layer, array
$adjX,
$adjY,
&$objs
)
|
|
Create and append a set of objects from the given layer
Parameters:
|
object The |
$view: |
SMap view |
|
array |
$layer: |
The layer and assoc info |
|
array |
$adjX: |
Append created objects here |
|
|
$adjY: |
|
|
|
&$objs: |
|
API Tags:
integer fetchLineString(
SMap_View
$view, resource
$geom, float
$adjX, float
$adjY, array
&$objs
)
|
|
Create a line string
Parameters:
|
object View |
$view: |
we are drawing for |
|
resource |
$geom: |
OGR geometry |
|
float |
$adjX: |
Adjust the line |
|
float |
$adjY: |
Adjust the line |
|
array |
&$objs: |
Place created objects here |
API Tags:
| Return: | OGR error code |
| Access: | protected |
integer fetchMultiPolygon(
SMap_View
$view,
$geom,
$adjX,
$adjY,
&$objs
)
|
|
Create a multi-polygon
Parameters:
|
resource |
$view: |
OGR geometry |
|
|
$geom: |
|
|
|
$adjX: |
|
|
|
$adjY: |
|
|
|
&$objs: |
|
API Tags:
| Return: | OGR error code |
| Access: | protected |
integer fetchPolygon(
SMap_View
$view,
$geom,
$adjX,
$adjY,
&$objs
)
|
|
Create a polygon
Parameters:
|
resource |
$view: |
OGR geometry |
|
|
$geom: |
|
|
|
$adjX: |
|
|
|
$adjY: |
|
|
|
&$objs: |
|
API Tags:
| Return: | OGR error code |
| Access: | protected |
Draw the vector file into objects
Parameters:
|
object |
$view: |
|
|
object |
$tile: |
|
API Tags:
Redefinition of:
- SMap_Layer::getImgObjs()
- Composite this layer onto the tile (in a raster way)
Objects for the image map
By default, there are none.
Parameters:
|
object |
$view: |
|
|
object |
$tile: |
|
API Tags:
Redefinition of:
- SMap_Layer::getMapObjs()
- Composite this layer onto the tile