Kyle,
How did you georeferenced your image?
Take a look in your georeferencing data...
If you used a worldfile, you can see some diference between X and Y values?
In another project, my images are all LatLon.
I wrote the same value of X in Y, only changed the signal.
But doing this, the tiles with 256x256 will overlap in vertical axis due to mercator projection. Now, after computing both X (Left-Right) and Y (Bottom-Top) i got right result.
Inspecting you _javascript_ code I found that you still using gmaps version 1. I sugest that you change to version2, because of better support for custom tiles.
And note that the initial zoom is 4. This zoom level in G_MAP_TYPE correspond to 12m/Pixel. Are you sure that your building is too large?
If it is this the location of you data: http://maps.google.com/?ll=42.291532,-83.714447&spn=0.028508,0.058537&t=k
seems that you need to try to correct this!
- - - V2 SAMPLE - - -
OBS.: I'm using a proxy php to do caching and other verifications.
Change the getTileUrl to your need.
And note that it´s returning BBOX in TopLeft,BottomRight;
Not BottomLeft,TopRight as WMS use...
I used the satellite map type. So it´s serving jpg files.
If you need to use png override the isPNG() function to return true.
Best Regards,
How did you georeferenced your image?
Take a look in your georeferencing data...
If you used a worldfile, you can see some diference between X and Y values?
In another project, my images are all LatLon.
I wrote the same value of X in Y, only changed the signal.
But doing this, the tiles with 256x256 will overlap in vertical axis due to mercator projection. Now, after computing both X (Left-Right) and Y (Bottom-Top) i got right result.
Inspecting you _javascript_ code I found that you still using gmaps version 1. I sugest that you change to version2, because of better support for custom tiles.
And note that the initial zoom is 4. This zoom level in G_MAP_TYPE correspond to 12m/Pixel. Are you sure that your building is too large?
If it is this the location of you data: http://maps.google.com/?ll=42.291532,-83.714447&spn=0.028508,0.058537&t=k
seems that you need to try to correct this!
- - - V2 SAMPLE - - -
//CUSTOM Layer
var N_SATELLITE_LAYER = new GTileLayer(new GCopyrightCollection(""), 0, 18);
N_SATELLITE_LAYER.hostName = 'dude.com';
N_SATELLITE_LAYER.pUpLeft = new GPoint(0,0);
N_SATELLITE_LAYER.pTopRight = new GPoint(0,0);
N_SATELLITE_LAYER.getTileUrl = function(a,b,c) {
var url = ""> if (this.hostName){
url = "" this.hostName+"/$2/");
};
if (
url.match(this.hostName)){
var ts = 256;
this.pUpLeft.x = a.x*ts;
this.pUpLeft.y = a.y*ts;
this.pTopRight.x = (a.x+1)*ts;
this.pTopRight.y = (
a.y+1)*ts;
var ul = G_SATELLITE_MAP.getProjection().fromPixelToLatLng(this.pUpLeft, b, c);
var br = G_SATELLITE_MAP.getProjection().fromPixelToLatLng( this.pTopRight, b, c);
var bbox =
ul.x + "," + ul.y + "," + br.x + "," + br.y;
url += '&maxzoom=18&box='+ bbox;
};
return url;
}
var Layer2=[N_SATELLITE_LAYER];- - - V2 SAMPLE - - -
var N_SATELLITE_MAP = new GMapType(Layer2, G_SATELLITE_MAP.getProjection(), 'MAP', G_SATELLITE_MAP);
var map = new GMap2(<your div>);
map.getMapTypes().length = 0;
map.addMapType(N_SATELLITE_MAP);
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(42.291532,-83.714447), 14);
OBS.: I'm using a proxy php to do caching and other verifications.
Change the getTileUrl to your need.
And note that it´s returning BBOX in TopLeft,BottomRight;
Not BottomLeft,TopRight as WMS use...
I used the satellite map type. So it´s serving jpg files.
If you need to use png override the isPNG() function to return true.
Best Regards,
Luiz Vaz
