Adding support for backgroundWidth and backgroundHeight properties on symbolizers. If not provided, background graphics are rendered with graphicWidth and graphicHeight values (or pointRadius if not provided). r=ahocevar (closes #1968)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@8947 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -336,6 +336,8 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, {
|
|||||||
* backgroundGraphicZIndex - {Number} The integer z-index value to use in rendering the background graphic.
|
* backgroundGraphicZIndex - {Number} The integer z-index value to use in rendering the background graphic.
|
||||||
* backgroundXOffset - {Number} The x offset (in pixels) for the background graphic.
|
* backgroundXOffset - {Number} The x offset (in pixels) for the background graphic.
|
||||||
* backgroundYOffset - {Number} The y offset (in pixels) for the background graphic.
|
* backgroundYOffset - {Number} The y offset (in pixels) for the background graphic.
|
||||||
|
* backgroundHeight - {Number} The height of the background graphic. If not provided, the graphicHeight will be used.
|
||||||
|
* backgroundWidth - {Number} The width of the background width. If not provided, the graphicWidth will be used.
|
||||||
* display - {String} Symbolizers will have no effect if display is set to "none". All other values have no effect.
|
* display - {String} Symbolizers will have no effect if display is set to "none". All other values have no effect.
|
||||||
*/
|
*/
|
||||||
OpenLayers.Feature.Vector.style = {
|
OpenLayers.Feature.Vector.style = {
|
||||||
|
|||||||
@@ -573,6 +573,8 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, {
|
|||||||
backgroundStyle.graphicXOffset = backgroundStyle.backgroundXOffset;
|
backgroundStyle.graphicXOffset = backgroundStyle.backgroundXOffset;
|
||||||
backgroundStyle.graphicYOffset = backgroundStyle.backgroundYOffset;
|
backgroundStyle.graphicYOffset = backgroundStyle.backgroundYOffset;
|
||||||
backgroundStyle.graphicZIndex = backgroundStyle.backgroundGraphicZIndex;
|
backgroundStyle.graphicZIndex = backgroundStyle.backgroundGraphicZIndex;
|
||||||
|
backgroundStyle.graphicWidth = backgroundStyle.backgroundWidth || backgroundStyle.graphicWidth;
|
||||||
|
backgroundStyle.graphicHeight = backgroundStyle.backgroundHeight || backgroundStyle.graphicHeight;
|
||||||
|
|
||||||
// Erase background styles.
|
// Erase background styles.
|
||||||
backgroundStyle.backgroundGraphic = null;
|
backgroundStyle.backgroundGraphic = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user