[OpenLayers-Dev] [OpenLayers-Trac] [OpenLayers] #736: external
graphic as style for vector points
Stephen Woodbridge
woodbri at swoodbridge.com
Wed Jun 6 23:35:17 EDT 2007
Christopher Schmidt wrote:
> On Wed, Jun 06, 2007 at 11:22:48PM -0000, OpenLayers wrote:
>> #736: external graphic as style for vector points
>> ---------------------------+------------------------------------------------
>> Reporter: openlayers | Owner:
>> Type: feature | Status: new
>> Priority: minor | Milestone:
>> Component: Renderer.SVG | Version: SVN
>> Resolution: | Keywords:
>> ---------------------------+------------------------------------------------
>> Comment (by ahocevar):
>>
>> The new version has support for opacity (using the fillOpacity property of
>> the style). It keeps the aspect ratio of images, and the size is
>> determined by the pointRadius style property. This is the behaviour
>> suggested in the SLD specification.
>
> Can I get an opinion on this from other people? If you've got a Vector
> feature, which is drawn as an image-at-a-point, is setting the width via
> pointRadius, and allowing the height to be set to maintain the aspect
> ratio, good enough?
>
> Or, should a different property -- perhaps graphicWidth/graphicHeight -- be
> used, to allow users to specify different widths/heights than the aspect
> ratio of the original image?
Chris,
I find the pointRadius to be a little counter intuitive for seting the
the image width, but I live with that. graphicWidth/graphicHeight or
imageWidth/imageHeight could be an option. If one is set then the other
is computed based on the apsect ratio, if both are set then the image is
stretched to fit. Or you could add an additional attribute like
keepAspectRatio: true/false
What paradigms have you used in the code that is similar to this?
-Steve
More information about the Dev
mailing list