[OpenLayers-Users] Label mis-align with IE9

Alexandre Dubé adube at mapgears.com
Thu Feb 7 05:47:42 PST 2013


Hey Andreas,

   http://dev5.mapgears.com/tests/openlayers-ie9-label-shift/

   I added more features to the example.  The label value represents the 
fontSize used.  As you can see, the offset depends on the font size.  In 
my app, the features contain clusters and their size depends on how many 
they have, and the label represents that number as well.  The label size 
is also dynamically computed to fit inside the feature (it also 
considers the number of digits in the number).  So, in my case, my only 
plausible short-term solution is to switch to Canvas for IE9.

   Please, let me know if you find anything else or if you'd like to 
have more test-cases.

Best regards,

Alexandre


On 13-02-07 04:32 AM, Andreas Hocevar wrote:
> Hey Alexandre,
>
> thanks for putting together this example. I guess the only workaround
> other than using the Canvas renderer is to do a browser check in the
> SVG renderer (the issue also persists with IE10) and apply an offset
> to labels. I guess it will be fun to find out what offset is required.
> Is it linear with the font size, is it fixed, ...?
>
> Andreas.
>
> On Wed, Feb 6, 2013 at 3:30 PM, Alexandre Dubé <adube at mapgears.com> wrote:
>> Hi Andreas,
>>
>>    I just hit the same issue described here in one of my app.  I made a small
>> example to clearly show the issue with the SVG renderer in IE9 :
>>
>>      http://dev5.mapgears.com/tests/openlayers-ie9-label-shift/
>>
>>    Canvas is fine in IE9.  VML works fine for IE8 and 7. Has anyone found a
>> solution for this yet ?  Any workaround ?
>>
>> Regards,
>>
>> Alexandre
>>
>>
>>
>> On 12-07-25 03:38 AM, Andreas Hocevar wrote:
>>> I just tried myself and noticed a slight shift towards the bottom in
>>> IE9. Can you confirm that this is what you're seeing, or is there
>>> something else/different?
>>>
>>> Andreas.
>>>
>>> On Tue, Jul 10, 2012 at 7:35 PM, Lak Krishnan
>>> <lakshmanan.krishnan at mecklenburgcountync.gov> wrote:
>>>> "vector feature with text" example still shows with the labels shifted in
>>>> IE9. Is there anything else that need to be done to eliminate the vector
>>>> label misalignment problem? I have the same problem in one of my
>>>> applications. I have the below in my HTML document and it has not helped
>>>> the
>>>> cause at all.
>>>>
>>>> <!DOCTYPE html>
>>>> <html lang="en">
>>>>
>>>> -lak
>>>>
>>>> --
>>>> View this message in context:
>>>> http://osgeo-org.1560.n6.nabble.com/Label-mis-align-with-IE9-tp3916849p4987384.html
>>>> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>>
>>>
>>
>> --
>> Alexandre Dubé
>> Mapgears
>> www.mapgears.com
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>


-- 
Alexandre Dubé
Mapgears
www.mapgears.com



More information about the Users mailing list