Hey Jeff,

I'm not sure right off why this is happening so I'm going to forward it on to the Ushahidi dev list (CC'd). The OpenLayers list may also be a good a place to look.

Anyone out there have experience with this?

Brian

On Sat, May 22, 2010 at 10:32 PM, Jeffrey Warren <warren@...> wrote:
hey brian - how's it going? We should figure out a way to get some drinks again soon; hangin' out in Amman was a ton of fun.

Quick tech question: I've been chillin' with the Louisiana Bucket Brigade folks and we were trying to get our balloon map layers to show up in the Ushahidi map. I managed to get a TMS to appear in the OpenLayers sidebar as an overlay but i'm not seeing the actual tiles.

Shannon from LABB said you and perhaps someone else had helped them with a layer issue before; am I missing something? i was just using:


function overlay_getTileURL(bounds) {
    var res = this.map.getResolution();
    var x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w));
    var y = Math.round((bounds.bottom - this.tileOrigin.lat) / (res * this.tileSize.h));
    var z = this.map.getZoom();
    if (this.map.baseLayer.name == 'Virtual Earth Roads' || this.map.baseLayer.name == 'Virtual Earth Aerial' || this.map.baseLayer.name == 'Virtual Earth Hybrid') {
       z = z + 1;
    }
    if (mapBounds.intersectsBounds( bounds ) && z >= mapMinZoom && z <= mapMaxZoom ) {
       //console.log( this.url + z + "/" + x + "/" + y + "." + this.type);
       return this.url + z + "/" + x + "/" + y + "." + this.type;
    } else {
       return "http://www.maptiler.org/img/none.png";
    }
}
var tmsoverlay = new OpenLayers.Layer.TMS( "TMS Overlay", "http://maps.grassrootsmapping.org/may-7-port-fourchon-balloon-oliver/", { type: 'png', getURL: overlay_getTileURL, alpha: true, isBaseLayer: false }); if (OpenLayers.Util.alphaHack() == false) { tmsoverlay.setOpacity(0.7); }; map.addLayers([tmsoverlay]);

in the Safari JS console. I tried it from a local TMS too to be sure it wasn't JS security stopping it. What's weird is that it's not actually even making requests for tiles; the issue occurs between when it accepts the new layer and makes tile requests.

Any ideas? Any help is appreciated. I could also bump this to the OpenLayers list or the Ushahidi list?
Jeff