OpenLayers OpenLayers

Changeset 3355

Show
Ignore:
Timestamp:
06/17/07 12:13:20 (1 year ago)
Author:
ahocevar
Message:

#736; fixed comments and added a description.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/camptocamp/externalGraphics/examples/vector-features.html

    r3276 r3355  
    11<html xmlns="http://www.w3.org/1999/xhtml"> 
    2   <head> 
    3     <style type="text/css"> 
     2<head> 
     3<style type="text/css"> 
    44        #map { 
    55            width: 800px; 
     
    88        } 
    99    </style> 
    10     <script src="../lib/OpenLayers.js"></script> 
    11     <script type="text/javascript"> 
     10<script src="../lib/OpenLayers.js" type="text/javascript"></script> 
     11<script type="text/javascript"> 
    1212        <!-- 
    1313        var map; 
     
    2424            style_blue.externalGraphic = "../img/marker.png"; 
    2525             
    26             // each of the three lines below means the same, if only one ot 
     26            // each of the three lines below means the same, if only one of 
    2727            // them is active: the image will have a size of 24px, and the 
    2828            // aspect ratio will be kept 
     
    4343            // if graphicWidth and graphicHeight are both set, the aspect ratio 
    4444            // of the image will be ignored 
    45                        style_mark.graphicWidth = 24; 
    46                        style_mark.graphicHeight = 20; 
    47                          
    48                         style_mark.externalGraphic = "../img/marker.png";            
     45            style_mark.graphicWidth = 24; 
     46            style_mark.graphicHeight = 20; 
     47             
     48            style_mark.externalGraphic = "../img/marker.png"; 
    4949             
    5050            var vectorLayer = new OpenLayers.Layer.Vector("Simple Geometry"); 
     
    9191        // --> 
    9292    </script> 
    93   </head> 
    94   <body onload="init()"> 
    95     <div id="map"></div> 
    96     <p>This example shows drawing simple vector features -- point, line, polygon 
    97        in different styles, created 'manually', by constructing the entire style 
    98        object, via 'copy', extending the default style object, and by  
    99        inheriting the default style from the layer.</p> 
    100   </body> 
     93</head> 
     94<body onload="init()"> 
     95<div id="map"></div> 
     96<p>This example shows drawing simple vector features -- point, line, 
     97polygon in different styles, created 'manually', by constructing the 
     98entire style object, via 'copy', extending the default style object, and 
     99by inheriting the default style from the layer.</p> 
     100<p>It also shows how to use external graphic files for point features 
     101and how to set their size: If either graphicWidth or graphicHeight is set, 
     102the aspect ratio of the image will be respected. If both graphicWidth and 
     103graphicHeight are set, it will be ignored. Alternatively, if graphicWidth 
     104and graphicHeight are omitted, pointRadius will be used to set the size 
     105of the image, which will then be twice the value of pointRadius with the 
     106original aspect ratio.</p> 
     107</body> 
    101108</html>