allow user to specify offsets for externalGraphic (closes #893)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@4268 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2007-09-13 20:36:36 +00:00
parent 68472d888b
commit ab53ba3982
5 changed files with 63 additions and 9 deletions

View File

@@ -58,6 +58,8 @@
// of the image will be ignored
style_mark.graphicWidth = 24;
style_mark.graphicHeight = 20;
style_mark.graphicXOffset = -(style_mark.graphicWidth/2); // this is the default value
style_mark.graphicYOffset = -style_mark.graphicHeight;
style_mark.externalGraphic = "../img/marker.png";
var vectorLayer = new OpenLayers.Layer.Vector("Simple Geometry", {style: layer_style});