Thoughts about #2318: move pink tiles to css

12 messages Options
Embed this post
Permalink
Roald de Wit-2

Thoughts about #2318: move pink tiles to css

Reply Threaded More More options
Print post
Permalink
Hi list,

During the FOSS4G 2009 codesprint I worked on ticket #2318 [1], which
has been committed to trunk. It is now possible to fully control the
looks of a broken image using CSS. The change also involves setting the
src of the broken image to a blank.gif.  There is one drawback with this
last addition: you cannot right-click on the image anymore to see a
possible server error (since the src URL has changed).

Is this behaviour something we can live with or would it be better to
keep the src URL pointing to the original image?

Regards, Roald

[1] http://trac.openlayers.org/ticket/2318

--
Roald de Wit
Software Engineer
[hidden email]

Commercial Support for Open Source GIS Software
http://lisasoft.com/LISAsoft/SupportedProducts/



The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Stephen Woodbridge

Re: Thoughts about #2318: move pink tiles to css

Reply Threaded More More options
Print post
Permalink
Roald de Wit wrote:

> Hi list,
>
> During the FOSS4G 2009 codesprint I worked on ticket #2318 [1], which
> has been committed to trunk. It is now possible to fully control the
> looks of a broken image using CSS. The change also involves setting the
> src of the broken image to a blank.gif.  There is one drawback with this
> last addition: you cannot right-click on the image anymore to see a
> possible server error (since the src URL has changed).
>
> Is this behaviour something we can live with or would it be better to
> keep the src URL pointing to the original image?
>
> Regards, Roald
>
> [1] http://trac.openlayers.org/ticket/2318

Roald,

Any chance that this behavior could be controlled by an option to the
layer definition. When I'm building an application is it nice to be able
to debug it with a right click, but when I deploy it, I think the new
behavior is likely to be preferred.

-Steve W
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
zspitzer

Re: Thoughts about #2318: move pink tiles to css

Reply Threaded More More options
Print post
Permalink
something like a layer option of cssErrorClass ?

i have been pondering the idea of a different debug behavior
for uncombined library usage..

z


On Mon, Oct 26, 2009 at 1:18 PM, Stephen Woodbridge
<[hidden email]> wrote:

> Roald de Wit wrote:
>> Hi list,
>>
>> During the FOSS4G 2009 codesprint I worked on ticket #2318 [1], which
>> has been committed to trunk. It is now possible to fully control the
>> looks of a broken image using CSS. The change also involves setting the
>> src of the broken image to a blank.gif.  There is one drawback with this
>> last addition: you cannot right-click on the image anymore to see a
>> possible server error (since the src URL has changed).
>>
>> Is this behaviour something we can live with or would it be better to
>> keep the src URL pointing to the original image?
>>
>> Regards, Roald
>>
>> [1] http://trac.openlayers.org/ticket/2318
>
> Roald,
>
> Any chance that this behavior could be controlled by an option to the
> layer definition. When I'm building an application is it nice to be able
> to debug it with a right click, but when I deploy it, I think the new
> behavior is likely to be preferred.
>
> -Steve W
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/dev
>



--
Zac Spitzer -
http://zacster.blogspot.com
+61 405 847 168
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Niklas Ringdahl

Text placement of features in vector layer

Reply Threaded More More options
Print post
Permalink
Hi list.

I would like to have more control on the label placement, using features with labels on a vector layer.

I have several features added to a vector layer, rendering in SVG. I use the style attribute "label" to set a label text for the point, and the "labelAlign" attribute to set the alignment. But I don't feel that the "labelAlign" property is doing what I want, I would like more control of where my label ends up. So I looked into the SVG specification and the DOM elements created by OpenLayers for my features and labels and found the "dx" and "dy" attributes, which don't seem to be used in OpenLayers renderers. Is this a design decision or is it just an area which noone have looked into?

What I would like to do is to be able to set the SVG specific properties, like "dx" and "dy" on the tspan element, to fine tune the placement of the labels. Are there any more possibilities to control this than using the "labelAlign" today?

If there is some kind of documentation of the label handling out there that I haven't found, I would be happy to be pointed in the right direction.

Thanks!
- Niklas
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Christopher Schmidt-2

Re: Thoughts about #2318: move pink tiles to css

Reply Threaded More More options
Print post
Permalink
In reply to this post by Roald de Wit-2
On Mon, Oct 26, 2009 at 11:47:59AM +1100, Roald de Wit wrote:
> Hi list,
>
> During the FOSS4G 2009 codesprint I worked on ticket #2318 [1], which
> has been committed to trunk. It is now possible to fully control the
> looks of a broken image using CSS. The change also involves setting the
> src of the broken image to a blank.gif.  There is one drawback with this
> last addition: you cannot right-click on the image anymore to see a
> possible server error (since the src URL has changed).

 ^^ This is a *huge* problem in my mind. Pink tiles being right clickable
is a big deal to me, and I'd like to see it change. I'm not 100% sure
I understand the reason that this is required (I haven't looked at the code),
but if there is no way to do this without losing the right click behavior,
we at least need to make it an option (and I'd prefer one defaulting to the
same as it does currently).

-- Chris

>
> Is this behaviour something we can live with or would it be better to
> keep the src URL pointing to the original image?
>
> Regards, Roald
>
> [1] http://trac.openlayers.org/ticket/2318
>
> --
> Roald de Wit
> Software Engineer
> [hidden email]
>
> Commercial Support for Open Source GIS Software
> http://lisasoft.com/LISAsoft/SupportedProducts/
>
>
>
> The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/dev

--
Christopher Schmidt
MetaCarta
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Roald de Wit-2

Re: Text placement of features in vector layer

Reply Threaded More More options
Print post
Permalink
In reply to this post by Niklas Ringdahl
Hi,

Is this something that might help you? It got into trunk just a few days
ago.

#2312: Add label offset to styles
http://trac.openlayers.org/ticket/2312

Regards, Roald

Ringdahl Niklas wrote:

> Hi list.
>
> I would like to have more control on the label placement, using features with labels on a vector layer.
>
> I have several features added to a vector layer, rendering in SVG. I use the style attribute "label" to set a label text for the point, and the "labelAlign" attribute to set the alignment. But I don't feel that the "labelAlign" property is doing what I want, I would like more control of where my label ends up. So I looked into the SVG specification and the DOM elements created by OpenLayers for my features and labels and found the "dx" and "dy" attributes, which don't seem to be used in OpenLayers renderers. Is this a design decision or is it just an area which noone have looked into?
>
> What I would like to do is to be able to set the SVG specific properties, like "dx" and "dy" on the tspan element, to fine tune the placement of the labels. Are there any more possibilities to control this than using the "labelAlign" today?
>
> If there is some kind of documentation of the label handling out there that I haven't found, I would be happy to be pointed in the right direction.
>
> Thanks!
> - Niklas
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/dev
>  

_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Roald de Wit-2

Re: Thoughts about #2318: move pink tiles to css

Reply Threaded More More options
Print post
Permalink
In reply to this post by Christopher Schmidt-2
Hi,

Zac suggested using CSS error class names for debugging, but that might
be a bit too fancy for now (this would be a OL wide change). Chris &
Stephen, any idea what the option would look like? We could make it very
flexible by having the option being the URL for the replacement imagd
(blank gif now), so one could show any image on load error.
I'll also look into just removing the bit that sets the src URL. The
drawback will be that in some browsers one won't be able to hide the
broken image (IE6 IIRC).

Regards, Roald

Christopher Schmidt wrote:

> On Mon, Oct 26, 2009 at 11:47:59AM +1100, Roald de Wit wrote:
>  
>> Hi list,
>>
>> During the FOSS4G 2009 codesprint I worked on ticket #2318 [1], which
>> has been committed to trunk. It is now possible to fully control the
>> looks of a broken image using CSS. The change also involves setting the
>> src of the broken image to a blank.gif.  There is one drawback with this
>> last addition: you cannot right-click on the image anymore to see a
>> possible server error (since the src URL has changed).
>>    
>
>  ^^ This is a *huge* problem in my mind. Pink tiles being right clickable
> is a big deal to me, and I'd like to see it change. I'm not 100% sure
> I understand the reason that this is required (I haven't looked at the code),
> but if there is no way to do this without losing the right click behavior,
> we at least need to make it an option (and I'd prefer one defaulting to the
> same as it does currently).
>
> -- Chris
>
>  
>> Is this behaviour something we can live with or would it be better to
>> keep the src URL pointing to the original image?
>>
>> Regards, Roald
>>
>> [1] http://trac.openlayers.org/ticket/2318
>>
>> --
>> Roald de Wit
>> Software Engineer
>> [hidden email]
>>
>> Commercial Support for Open Source GIS Software
>> http://lisasoft.com/LISAsoft/SupportedProducts/
>>
>>
>>
>> The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.
>> _______________________________________________
>> Dev mailing list
>> [hidden email]
>> http://openlayers.org/mailman/listinfo/dev
>>    
>
>  

_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Tim Schaub

Re: Thoughts about #2318: move pink tiles to css

Reply Threaded More More options
Print post
Permalink
In reply to this post by Christopher Schmidt-2
Christopher Schmidt wrote:

> On Mon, Oct 26, 2009 at 11:47:59AM +1100, Roald de Wit wrote:
>> Hi list,
>>
>> During the FOSS4G 2009 codesprint I worked on ticket #2318 [1], which
>> has been committed to trunk. It is now possible to fully control the
>> looks of a broken image using CSS. The change also involves setting the
>> src of the broken image to a blank.gif.  There is one drawback with this
>> last addition: you cannot right-click on the image anymore to see a
>> possible server error (since the src URL has changed).
>
>  ^^ This is a *huge* problem in my mind. Pink tiles being right clickable
> is a big deal to me, and I'd like to see it change. I'm not 100% sure
> I understand the reason that this is required (I haven't looked at the code),
> but if there is no way to do this without losing the right click behavior,
> we at least need to make it an option (and I'd prefer one defaulting to the
> same as it does currently).
>

Yeah, I'd suggest separating these issues.  Looking at the changeset
(http://trac.openlayers.org/changeset/9758), I'm guessing setting the
image source was not required by the issue discussed in the ticket.

If setting the image source to blank.gif is meant to get rid of the
broken image icon in some browsers, that deserves a separate ticket (and
I agree we need to maintain the current behavior that lets you get the URL).

Tim

> -- Chris
>
>> Is this behaviour something we can live with or would it be better to
>> keep the src URL pointing to the original image?
>>
>> Regards, Roald
>>
>> [1] http://trac.openlayers.org/ticket/2318
>>
>> --
>> Roald de Wit
>> Software Engineer
>> [hidden email]
>>
>> Commercial Support for Open Source GIS Software
>> http://lisasoft.com/LISAsoft/SupportedProducts/
>>
>>
>>
>> The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.
>> _______________________________________________
>> Dev mailing list
>> [hidden email]
>> http://openlayers.org/mailman/listinfo/dev
>


--
Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Roald de Wit-2

Re: Thoughts about #2318: move pink tiles to css

Reply Threaded More More options
Print post
Permalink
Hi,

On 27/10/09 10:03, Tim Schaub wrote:
> Yeah, I'd suggest separating these issues. Looking at the changeset
> (http://trac.openlayers.org/changeset/9758), I'm guessing setting the
> image source was not required by the issue discussed in the ticket.
>
> If setting the image source to blank.gif is meant to get rid of the
> broken image icon in some browsers, that deserves a separate ticket (and
> I agree we need to maintain the current behavior that lets you get the URL).
>

You're absolutely right. During the codesprint we thought it was a good
idea, without realising the consequences of it (we got a little too
drastic/enthusiastic). I just reopened the ticket and uploaded a new
patch that is much simpler and still gives full control over
hiding/showing broken images.

I hope this is a more acceptable approach. If someone can review it,
that would be great.

Regards, Roald

--
Roald de Wit
Software Engineer
[hidden email]

Commercial Support for Open Source GIS Software
http://lisasoft.com/LISAsoft/SupportedProducts/



The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Eric Lemoine-2-2

Re: Thoughts about #2318: move pink tiles to css

Reply Threaded More More options
Print post
Permalink
On Tuesday, October 27, 2009, Roald de Wit <[hidden email]> wrote:

> Hi,
>
> On 27/10/09 10:03, Tim Schaub wrote:
>> Yeah, I'd suggest separating these issues. Looking at the changeset
>> (http://trac.openlayers.org/changeset/9758), I'm guessing setting the
>> image source was not required by the issue discussed in the ticket.
>>
>> If setting the image source to blank.gif is meant to get rid of the
>> broken image icon in some browsers, that deserves a separate ticket (and
>> I agree we need to maintain the current behavior that lets you get the URL).
>>
>
> You're absolutely right. During the codesprint we thought it was a good
> idea, without realising the consequences of it (we got a little too
> drastic/enthusiastic). I just reopened the ticket and uploaded a new
> patch that is much simpler and still gives full control over
> hiding/showing broken images.
>
> I hope this is a more acceptable approach. If someone can review it,
> that would be great.

Hi Roald. I'll review it. Thanks for bringing the subject to the mailing list.

Cheers,

--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [hidden email]
http://www.camptocamp.com
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Niklas Ringdahl

Re: Text placement of features in vector layer

Reply Threaded More More options
Print post
Permalink
In reply to this post by Roald de Wit-2
Yes! That is exactly what I thought was missing from the label design. :-) I will see if I am able to use the trunk version though, maybe I'll have to wait for the next release.

Thanks a lot Roald!
- Niklas
 

-----Ursprungligt meddelande-----
Från: Roald de Wit [mailto:[hidden email]]
Skickat: den 26 oktober 2009 22:29
Till: Ringdahl Niklas
Kopia: OpenLayers Dev
Ämne: Re: [OpenLayers-Dev] Text placement of features in vector layer

Hi,

Is this something that might help you? It got into trunk just a few days ago.

#2312: Add label offset to styles
http://trac.openlayers.org/ticket/2312

Regards, Roald

Ringdahl Niklas wrote:

> Hi list.
>
> I would like to have more control on the label placement, using features with labels on a vector layer.
>
> I have several features added to a vector layer, rendering in SVG. I use the style attribute "label" to set a label text for the point, and the "labelAlign" attribute to set the alignment. But I don't feel that the "labelAlign" property is doing what I want, I would like more control of where my label ends up. So I looked into the SVG specification and the DOM elements created by OpenLayers for my features and labels and found the "dx" and "dy" attributes, which don't seem to be used in OpenLayers renderers. Is this a design decision or is it just an area which noone have looked into?
>
> What I would like to do is to be able to set the SVG specific properties, like "dx" and "dy" on the tspan element, to fine tune the placement of the labels. Are there any more possibilities to control this than using the "labelAlign" today?
>
> If there is some kind of documentation of the label handling out there that I haven't found, I would be happy to be pointed in the right direction.
>
> Thanks!
> - Niklas
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/dev
>  

_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
zspitzer

Re: Thoughts about #2318: move pink tiles to css

Reply Threaded More More options
Print post
Permalink
In reply to this post by Eric Lemoine-2-2
how about having OL fire a tileError event?

On Tue, Oct 27, 2009 at 5:31 PM, Eric Lemoine <[hidden email]> wrote:
On Tuesday, October 27, 2009, Roald de Wit <[hidden email]> wrote:
> Hi,
>
> On 27/10/09 10:03, Tim Schaub wrote:
>> Yeah, I'd suggest separating these issues. Looking at the changeset
>> (http://trac.openlayers.org/changeset/9758), I'm guessing setting the
>> image source was not required by the issue discussed in the ticket.
>>
>> If setting the image source to blank.gif is meant to get rid of the
>> broken image icon in some browsers, that deserves a separate ticket (and
>> I agree we need to maintain the current behavior that lets you get the URL).
>>
>
> You're absolutely right. During the codesprint we thought it was a good
> idea, without realising the consequences of it (we got a little too
> drastic/enthusiastic). I just reopened the ticket and uploaded a new
> patch that is much simpler and still gives full control over
> hiding/showing broken images.
>
> I hope this is a more acceptable approach. If someone can review it,
> that would be great.

Hi Roald. I'll review it. Thanks for bringing the subject to the mailing list.

Cheers,

--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [hidden email]
http://www.camptocamp.com
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev



--
Zac Spitzer -
http://zacster.blogspot.com
+61 405 847 168

_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev