Difference between revisions of "VOCWiki:BCMap"

From VOC Wiki
Jump to: navigation, search
(New page: ==BCMap Extension== There's a custom mediawiki extension on VOCWiki which allows one to embed a map from bcbasemap. To use this feature, write something like this in a wiki page <code><no...)
 
(describe new addlayers and removelayers features)
Line 1: Line 1:
 
==BCMap Extension==
 
==BCMap Extension==
  
There's a custom mediawiki extension on VOCWiki which allows one to embed a map from bcbasemap. To use this feature, write something like this in a wiki page <code><nowiki><bcmap>lat=50.1|long=123.2</bcmap></nowiki></code>. You must specify the center of the map using (lat and long) OR you can specify the bounding box of the map using (north and south and east and west) parameters.
+
There's a custom mediawiki extension on VOCWiki which allows one to embed a map from bcbasemap.  
 +
 
 +
==Usage==
 +
To use this feature, write something like this in a wiki page <code><nowiki><bcmap>lat=50.1|long=123.2</bcmap></nowiki></code>. You must specify the center of the map using (lat and long) OR you can specify the bounding box of the map using (north and south and east and west) parameters.
  
 
Additionally, there are some optional paramaters :
 
Additionally, there are some optional paramaters :
Line 10: Line 13:
 
# linkscale: when you click on the map you'll be shown an image with this scale (default:2*scale)
 
# linkscale: when you click on the map you'll be shown an image with this scale (default:2*scale)
 
# alttext: what text-only web browsers will see instead of the map (default:BC Basemap)
 
# alttext: what text-only web browsers will see instead of the map (default:BC Basemap)
 
BC Basemaps can be a bit slow to load since they are generated on the fly. The html code generated does include WIDTH and HEIGHT tags so the slow image shouldn't prevent the rest of the page from rendering quickly.
 
  
 
Example:
 
Example:
 
<code><nowiki><bcmap>lat=49.9|long=123.0|scale=100|width=8|height=4</bcmap></nowiki></code> gives this:
 
<code><nowiki><bcmap>lat=49.9|long=123.0|scale=100|width=8|height=4</bcmap></nowiki></code> gives this:
 
<bcmap>lat=49.9|long=123.0|scale=100|width=8|height=4</bcmap>
 
<bcmap>lat=49.9|long=123.0|scale=100|width=8|height=4</bcmap>
 +
 +
==Advanced Usage==
 +
 +
You can control the layers by using the following optional parameters:
 +
 +
# addlayers: comma separated list of additional layers to activate
 +
# removelayers: comma seperated list of layers to deactivate
 +
 +
The layers names appear to be treated in a case sensitive fashion my bc maps. So we do the same in the extension. Make sure you get capitalization correctly.
 +
 +
List of default layers:
 +
 +
TRIM_EBM_OCEAN TRIM_EBM_WATERBODIES TRIM_EBM_WATERCOURSES TRIM_EBM_WETLANDS TWTR_LINES TTRN_LINES TCVR_LINES TCVR_POINTS TCTR_LINES TTRN_POINTS TSRF_POINTS TCTR_POINTS WHSE_BASEMAPPING.TRIM_TEXT_ANNO TWTR_ANNO TTRN_ANNO TCVR_ANNO TCUL_LINES TCTR_ANNO BCGS_GRIDNTS_BC_COASTLINE_POLYS_125M NTS_BC_RIV_LAKE_WET_POLYS_125M NTS_BC_COASTLINE_LINES_125M NTS_BC_CONTOUR_LINES_125M NTS_BC_MANMADE_LINES_125M NTS_BC_TRANSPORT_LINES_125M NTS_BC_TRANSPORT_POINTS_125M NTS_BC_WATER_POINTS_125M NTS_BC_LANDFORM_POINTS_125M NTS_BC_ANNO NTS_GRID BC_RIV_LAKE_WET_POLYS_500M BC_WATER_LINES_500M BC_TRANSPORT_LINES_500M BC_PROV_BOUNDARIES_LINES_500M BC_MANMADE_LINES_500M BC_MAJOR_CITIES_POINTS_500M BC_WATER_POINTS_500M BC_TRANSPORT_POINTS_500M BC_SPOT_ELEVATION_POINTS_500M BC_MANMADE_POINTS_500M BC_WATER_POLYS_5KM BC_BASEMAP_LINES_5KM_water BC_BASEMAP_LINES_5KM_transport BC_BASEMAP_LINES_5KM_boundary DBM_7H_MIL_POPULATION_POINT DBM_7H_MIL_BOUNDARIES_LINE DBM_7H_MIL_DRAINAGE_LINE DBM_7H_MIL_ROADS_LINE DBM_7H_MIL_PARK_POLY DBM_7H_MIL_POLITICAL_POLY_PS DBM_7H_MIL_POLITICAL_POLY_BC DBM_7H_MIL_BATHYMETRIC_POLY
 +
 +
Example:
 +
<code><nowiki><bcmap>lat=49.9|long=123.0|scale=100|width=8|height=4|addlayers=BCGS_GRID,TRSF_ANNO|removelayers=TRIM_EBM_WATERBODIES,TRIM_EBM_WATERCOURSES</bcmap></nowiki></code> gives this:
 +
<bcmap>lat=49.9|long=123.0|scale=100|width=8|height=4|addlayers=BCGS_GRID,TRSF_ANNO|removelayers=TRIM_EBM_WATERBODIES,TRIM_EBM_WATERCOURSES</bcmap>

Revision as of 19:53, 28 February 2008

BCMap Extension

There's a custom mediawiki extension on VOCWiki which allows one to embed a map from bcbasemap.

Usage

To use this feature, write something like this in a wiki page <bcmap>lat=50.1|long=123.2</bcmap>. You must specify the center of the map using (lat and long) OR you can specify the bounding box of the map using (north and south and east and west) parameters.

Additionally, there are some optional paramaters :

  1. height: height of the map in km (default:10km)
  2. width: width of the map in km (default:10km)
  3. scale: map scale in pixels / km (default:100 pixels/km)
  4. linkscale: when you click on the map you'll be shown an image with this scale (default:2*scale)
  5. alttext: what text-only web browsers will see instead of the map (default:BC Basemap)

Example: <bcmap>lat=49.9|long=123.0|scale=100|width=8|height=4</bcmap> gives this: <bcmap>lat=49.9|long=123.0|scale=100|width=8|height=4</bcmap>

Advanced Usage

You can control the layers by using the following optional parameters:

  1. addlayers: comma separated list of additional layers to activate
  2. removelayers: comma seperated list of layers to deactivate

The layers names appear to be treated in a case sensitive fashion my bc maps. So we do the same in the extension. Make sure you get capitalization correctly.

List of default layers:

TRIM_EBM_OCEAN TRIM_EBM_WATERBODIES TRIM_EBM_WATERCOURSES TRIM_EBM_WETLANDS TWTR_LINES TTRN_LINES TCVR_LINES TCVR_POINTS TCTR_LINES TTRN_POINTS TSRF_POINTS TCTR_POINTS WHSE_BASEMAPPING.TRIM_TEXT_ANNO TWTR_ANNO TTRN_ANNO TCVR_ANNO TCUL_LINES TCTR_ANNO BCGS_GRIDNTS_BC_COASTLINE_POLYS_125M NTS_BC_RIV_LAKE_WET_POLYS_125M NTS_BC_COASTLINE_LINES_125M NTS_BC_CONTOUR_LINES_125M NTS_BC_MANMADE_LINES_125M NTS_BC_TRANSPORT_LINES_125M NTS_BC_TRANSPORT_POINTS_125M NTS_BC_WATER_POINTS_125M NTS_BC_LANDFORM_POINTS_125M NTS_BC_ANNO NTS_GRID BC_RIV_LAKE_WET_POLYS_500M BC_WATER_LINES_500M BC_TRANSPORT_LINES_500M BC_PROV_BOUNDARIES_LINES_500M BC_MANMADE_LINES_500M BC_MAJOR_CITIES_POINTS_500M BC_WATER_POINTS_500M BC_TRANSPORT_POINTS_500M BC_SPOT_ELEVATION_POINTS_500M BC_MANMADE_POINTS_500M BC_WATER_POLYS_5KM BC_BASEMAP_LINES_5KM_water BC_BASEMAP_LINES_5KM_transport BC_BASEMAP_LINES_5KM_boundary DBM_7H_MIL_POPULATION_POINT DBM_7H_MIL_BOUNDARIES_LINE DBM_7H_MIL_DRAINAGE_LINE DBM_7H_MIL_ROADS_LINE DBM_7H_MIL_PARK_POLY DBM_7H_MIL_POLITICAL_POLY_PS DBM_7H_MIL_POLITICAL_POLY_BC DBM_7H_MIL_BATHYMETRIC_POLY

Example: <bcmap>lat=49.9|long=123.0|scale=100|width=8|height=4|addlayers=BCGS_GRID,TRSF_ANNO|removelayers=TRIM_EBM_WATERBODIES,TRIM_EBM_WATERCOURSES</bcmap> gives this: <bcmap>lat=49.9|long=123.0|scale=100|width=8|height=4|addlayers=BCGS_GRID,TRSF_ANNO|removelayers=TRIM_EBM_WATERBODIES,TRIM_EBM_WATERCOURSES</bcmap>