[OpenLayers-Users] pareInt in Grid.js

Andreas Hocevar ahocevar at opengeo.org
Sun Oct 14 23:28:29 PDT 2012


Thanks for letting us know. The parseInt calls without radix parameter
and the gaps you see in 2.12 should be unrelated. Having said that,
the issue with the gaps is fixed in latest master, and I just added a
radix parameter to the two remaining parseInt calls in Grid.js.

Andreas.

On Thu, Oct 11, 2012 at 9:42 PM, billChadwick <w.chadwick at sky.com> wrote:
> There are several parseInt calls in grid.js in 2.12 that look to be missing
> the second parameter of 10 to force decimal. Does anyone know if this is
> intended or not ?
>
> I'm chasing down patching grid.js to work with map resolution >
> serverResolution (for retina type displays).
>
> I have patched the start of initGriddedTiles thus
>
>         var scale = this.getResolutionScale();
>
>         var viewSize = this.map.getSize();
>
>         var minRows = Math.ceil((viewSize.h/this.tileSize.h)/scale) + //
> /scale is patch
>                       Math.max(1, 2 * this.buffer);
>         var minCols = Math.ceil((viewSize.w/this.tileSize.w)/scale) + //
> /scale is patch
>                       Math.max(1, 2 * this.buffer);
>
> Without adding a call to moveGriddedTiles at the end of the function when
> scale is < 1, I get a gap of a few tiles at the top and left of the screen.
> With that extra call, all is fine and we can get a stunning map display on
> an IPad3. For an example, see here
> http://mortimermaps.appspot.com/demo/demo_hi.htm
>
>
>
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/pareInt-in-Grid-js-tp5008141.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



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


More information about the Users mailing list