[OpenLayers-Users] Change in API stopping a test app working?
Christopher Schmidt
crschmidt at crschmidt.net
Mon Jul 3 18:04:35 CDT 2006
On Mon, Jul 03, 2006 at 11:51:45PM +0100, nick at hogweed.org wrote:
>
> > I'm not sure exactly what changed that caused this -- it wasn't
> > happening on your site when I looked at it this morning.
>
> The code was commented out this morning.
>
> > But you probably want something in osmlayer.js which subclasses the
> > setMap call: you can just call out to the Grid.js version, probably:
> >
> > setMap: function(map) {
> > OpenLayers.Layer.prototype.setMap.apply(this, arguments);
> > if (this.tileSize == null) {
> > this.tileSize = this.map.getTileSize();
> > }
> > },
> >
> > This is a relatively recent change in the API.
>
> My layer subclasses Layer.Grid so it should override this anyway. Tried adding
> it anyhow, but didn't solve the problem. Specifically the error is in the
> _initTiles() method
>
> var tilelon = resolution*this.tileSize.w;
>
> generates the error. So I guess for one reason or another it hasn't
> initialised tileSize.
>
> Maybe worth just trying the 1.0 api - is this change more recent?
This change is more recent than 1.0 -- but I thought you were using
GeoRSS support? Which isn't in 1.0.
In any case, I just looked at your page, and it seems like something is
working -- I see a number of 'markers2' queries, which have put markers
on the map. I do see some syntax errors, but they seem to be in XML
parsing.
These appear to be loading from osmtile.js, so I'm not sure if there's
another part that's not working or not.
Did you figure out a way to fix this?
--
Christopher Schmidt
Web Developer
More information about the Users
mailing list