[OpenLayers-Dev] Firefox and canvas, strange behavior

Andreas Hocevar ahocevar at opengeo.org
Tue Mar 6 17:33:50 EST 2012


See https://github.com/openlayers/openlayers/pull/297.

Andreas.


On Tue, Mar 6, 2012 at 8:05 PM, Andreas Hocevar <ahocevar at opengeo.org> wrote:
> Hi,
>
> I found a solution: in Firefox, it is not enough to set
>
> img.crossOrigin = null;
>
> What you need to do is
>
> img.removeAttribute("crossorigin");
>
> Also note a typo in Tile/Image.js:
>
>                if (url.substr(0, 5 !== 'data:')) {
>
> should read
>
>                if (url.substr(0, 5) !== 'data:') {
>
> Andreas.
>
> On Fri, Feb 17, 2012 at 10:26 AM, Frederic Junod
> <frederic.junod at camptocamp.com> wrote:
>> Hello all,
>>
>> I'm trying to create a demo to shows the new canvas capabilities in
>> OpenLayers [1].
>> The attached example loads a basic OSM layer and turns the tiles into
>> grayscale. This works great with Chrome 16 and 18; even IE9 displays
>> the layer correctly [2].
>>
>> But I can't make it work with FireFox 10: the tiles are still in color
>> (and in the wrong position). Using firebug, I see that the img src are
>> correct (data url in base64).
>>
>> Repaint bug? src size limitation?
>>
>> Any advice welcome
>>
>> fredj
>>
>> [1] https://github.com/openlayers/openlayers/commit/ad201f3a80827f8189d9d798fb8c93fe67fd8865
>> [2] With IE9, a local proxy must be created, this comments inside the
>> attached file.
>>
>> --
>> Frédéric Junod
>> Camptocamp SA
>>
>> _______________________________________________
>> Dev mailing list
>> Dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
>>
>
>
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.


More information about the Dev mailing list