[OpenLayers-Users] Problems with svn head

Christopher Schmidt crschmidt at metacarta.com
Thu Apr 19 16:43:04 EDT 2007


On Thu, Apr 19, 2007 at 02:52:32PM -0400, Christopher Schmidt wrote:
> > > 2) map attached to cursor and requires an additional click to drop - 
> > > this is VERY annoying. 
> 
> This is the result of the ka-Map layer being broken. (I don't suppose
> "Use TileCache instead" will get me very far as an argument :))

Specifically, this was as a result of:
 * Using Overview Map
 * With ka-Map base layer.

The problem was that the ka-Map clone() function was not subclassing
properly, so it was returning a grid layer.

However, this won't fix your problem totally: your overview map won't
work, because the overview map defaults to 'maxResolution':'auto' (which
won't work with your pre-cached ka-map tiles). 

To change that, you'll need to set the scales option on your layer, instead
of your map:
var base = new OpenLayers.Layer.KaMap(
    "Base Tiles",
    "http://st1.slippymap.com/tiles?",
    { map: "smap-01",
      i: "PNG8",
      g: "__base__"
    }, 
    {scales: [ 6000, 10000, 15000,
        25000, 50000, 100000, 150000, 500000, 1000000,
        4000000, 10000000, 20000000, 50000000
    ]}
    );

Then, when the layer is cloned, it will have hte scales, and the
maxResolution: 'auto' n the overviewMap won't affect it.

Thanks for the report!

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list