OpenLayersのStyleMap classについて-2[Chapter 51]

====== OpenLayersを使ってみる。[Chapter 51] ======

[[http://blog.godo-tys.jp/2013/08/20/3831/|OpenLayersのStyleMap classについて-1[Chapter 50] ]]に引き続き、OpenLayersのStyleMap classについて基本を学んでいきます。

この章以降は、
* いかにOpenLayersのVector layerのstyleを表示するか?
* Style classをその使い方について -> **今回もここ**
* Rule classの使い方
* Filter classの使い方
について順番に学んでいきます。

[[http://www.packtpub.com/openlayers-2-1-javascript-web-mapping-library-beginners-guide/book|OpenLayers 2.10 Beginner’s Guide]]なる書籍の章立てにあわせて、OpenLayersの使い方を学んでいきます。

===== Symbplizer properties =====
Symbolizerを作成する場合、[[http://blog.godo-tys.jp/2013/08/20/3831/|OpenLayersのStyleMap classについて-1[Chapter 50] ]]に引き続き、次のpropertiesを使用することができます。

=== backgroundGraphic ===
**backgroundGraphic**: Specifies the URL of an image to use. This will be placed under the externalGraphic (if one is set).

=== backgroundGraphicZIndex ===
**backgroundGraphicZIndex**: Specifies the z-index (order of what gets placed on each other) of the backgroundGraphic.

=== backgroundHeight ===
**backgroundHeight**: Determines the height of the background image. If none is specified, graphicHeight is used.

=== backgroundWidth ===
**backgroundWidth**: Height of the background image, if one exists. If this property is not set and an image is provided, the graphicHeight property will be tried to use.

=== backgroundXOffset ===
**backgroundXOffset**: Specifies how far, in the X direction, to offset the image (in pixels).

=== backgroundYOffset ===
**backgroundYOffset**: Specifies how far, in the Y direction, to offset the image (in pixels).

=== display ===
**display**: If set to none, the symbolizer styles will not be applied.

=== externalGraphic ===
**externalGraphic**: Specifies the URL of an image to use (instead of the stroke and fill properties) when feature points are shown.

=== fill ===
**fill**: If set to false, no fill will be shown.

=== graphic ===
**graphic**: Setting to false will disable any graphics from being shown.

===graphicHeight ===
**graphicHeight**: The height, in pixels, of an external graphic (if it exists).

=== graphicOpacity ===
**graphicOpacity**: Specifies the opacity of associated graphic, ranging from 0 to 1 (1 being fully opaque, 0 being fully transparent).

=== graphicTitle ===
**graphicTitle**: This specifies tooltip text that will appear when mousing over an external graphic (if one is provided).

=== graphicWidth ===
**graphicWidth**: The width, in pixels, of an external graphic (if it exists).

=== graphicXOffset ===
**graphicXOffset**: How far, in the X direction, to offset the external graphic (in pixels).

=== graphicYOffset ===
**graphicYOffset**: How far, in the Y direction, to offset the external graphic (in pixels).

=== graphicZIndex ===
**graphicZIndex**: Specifies the z-index of the external graphic. A higher z-index means it will appear over elements with lower z-indexes.

=== rotation ===
**rotation**: Specifies how much to rotate a feature in a clockwise direction around its center. Values range from 0 to 360, default is 0. A value of 180 would be upside down.

===== 今回のまとめ =====

OpenLayersのStyleMap class propertiesの続きについて基本を学びました。
是非、symbolizer propertiesの値をいろいろと変更して、symbolizerについて学んでみましょう。
次回は、StyleMapのAttribute replacementについて基本を学んでいきます。

また、本tutorialは、htmlやCSSやJavaScriptの基本的なことはある程度理解している前提で今後も話を進めていきます。また、誤字、脱字、spell間違いや勘違いも多々出てくると考えられます。
それは違うじゃん!!とかいろんな意見をいただければと思います。
そこんところ ヨロシク~~!!

**[[http://blog.godo-tys.jp/openlayer-tutorial/|OpenLayers Tutorialの目次に戻る。]]**

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

CAPTCHA