I just tried the Google API V2 and it is different. Now the Geographic boundaries are in a filed position rather than a popup. This works.
Also, there is a new Window size for capturing the Google photo. This has a problem. The captured area is not the same as the area on the API screen. The eastern part of the capture seems to be missing. Guessing that the eastern grid squares (full squares) are not captured.
Dick Boley near 5G8
New Google API
Hi, Luis
It seems there's a problem with the new GE API http://www.ptsim.com/sbuilder/gmaps.htm.
1 - Changing the image size (1600 x 1200 to 3200 x 2400 and vice-versa),
the boundaries don't change. This means the image covers the same area and its resolution pixel/m was increased.
2 - Using the image's boundaries to georeference in GM, its size should be divided by two (with the size 3200 x 2400, I should use the pixels 1600 and 1200 to plot the bottom right corner (South-East);
3 - Doing this, the image dimensions are ok, but not its coordinates: the image shows displaced horizontally and vertically.
I used a known georefereced Aerodrome Chart to make the comparisons (VOR/NDB position).
Best regards,
José
J.F.Lôbo
It seems there's a problem with the new GE API http://www.ptsim.com/sbuilder/gmaps.htm.
1 - Changing the image size (1600 x 1200 to 3200 x 2400 and vice-versa),
the boundaries don't change. This means the image covers the same area and its resolution pixel/m was increased.
2 - Using the image's boundaries to georeference in GM, its size should be divided by two (with the size 3200 x 2400, I should use the pixels 1600 and 1200 to plot the bottom right corner (South-East);
3 - Doing this, the image dimensions are ok, but not its coordinates: the image shows displaced horizontally and vertically.
I used a known georefereced Aerodrome Chart to make the comparisons (VOR/NDB position).
Best regards,
José
J.F.Lôbo
Hi José
The starting window is 800x600. The idea was to get the same image (therefore with the same bounds) at a 2X resolution (1600x1200) or at 4X resolution (3200x2400). After reading your post I tried it and I see that the bounds change, which is wromg!!!!
I will check this!!!
Luis
Edited: while checking I would like to refer that the initial page is now a plain HTML page (gmaps.html) whose contents can be seen. This page has a form that sends this information:
<font color="red"><SELECT id="newMapSize" ... name="newMapSize">
<option selected value="1">1600 x 1200</option>
<option value="2">3200 x 2400</option>
<INPUT id="CLatitude" name="CLatitude">
<INPUT id="CLongitude" name="CLongitude">
<INPUT id="Zoom" type=hidden name="Zoom" value="0">
<INPUT id="MapType" type=hidden name="MapType" value="0"></font id="red">
to an ASP page called newgmap.asp. Here is the complete contents of this ASP page:
<font color="green"><% Response.Buffer = True
dim width
dim height
size = Trim(Request.Form("newMapSize"))
CLatitude = Trim(Request.Form("CLatitude"))
CLongitude = Trim(Request.Form("CLongitude"))
zoom = Trim(Request.Form("Zoom"))
maptype = Trim(Request.Form("MapType"))
if size = 1 then
width = 1600
height = 1200
zoom = zoom + 1
end if
if size = 2 then
width = 3200
height = 2400
zoom = zoom + 2
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Exploring Google Maps</title>
<script src="http://maps.google.com/maps?file=api&v= ... 3kJNkFePFA" type="text/javascript"></script>
<script type="text/javascript">
function onLoad(CLon,CLat,Zoom,Type)
{
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(CLat, CLon), Zoom);
if (Type == 0) { map.setMapType( G_SATELLITE_TYPE ) }
else { map.setMapType( G_MAP_TYPE ) }
}
</script>
</head>
<body onload="onLoad(<%=CLongitude%>,<%=CLatitude%>,<%=zoom%>,<%=maptype%>)" onunload="GUnload()">
<DIV id="map" style="LEFT: 0px; WIDTH: <%=width%>px; POSITION: absolute; TOP: 0px; HEIGHT: <%=height%>px"></DIV>
</body>
</html></font id="green">
There should be an error here.
The starting window is 800x600. The idea was to get the same image (therefore with the same bounds) at a 2X resolution (1600x1200) or at 4X resolution (3200x2400). After reading your post I tried it and I see that the bounds change, which is wromg!!!!
I will check this!!!
Luis
Edited: while checking I would like to refer that the initial page is now a plain HTML page (gmaps.html) whose contents can be seen. This page has a form that sends this information:
<font color="red"><SELECT id="newMapSize" ... name="newMapSize">
<option selected value="1">1600 x 1200</option>
<option value="2">3200 x 2400</option>
<INPUT id="CLatitude" name="CLatitude">
<INPUT id="CLongitude" name="CLongitude">
<INPUT id="Zoom" type=hidden name="Zoom" value="0">
<INPUT id="MapType" type=hidden name="MapType" value="0"></font id="red">
to an ASP page called newgmap.asp. Here is the complete contents of this ASP page:
<font color="green"><% Response.Buffer = True
dim width
dim height
size = Trim(Request.Form("newMapSize"))
CLatitude = Trim(Request.Form("CLatitude"))
CLongitude = Trim(Request.Form("CLongitude"))
zoom = Trim(Request.Form("Zoom"))
maptype = Trim(Request.Form("MapType"))
if size = 1 then
width = 1600
height = 1200
zoom = zoom + 1
end if
if size = 2 then
width = 3200
height = 2400
zoom = zoom + 2
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Exploring Google Maps</title>
<script src="http://maps.google.com/maps?file=api&v= ... 3kJNkFePFA" type="text/javascript"></script>
<script type="text/javascript">
function onLoad(CLon,CLat,Zoom,Type)
{
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(CLat, CLon), Zoom);
if (Type == 0) { map.setMapType( G_SATELLITE_TYPE ) }
else { map.setMapType( G_MAP_TYPE ) }
}
</script>
</head>
<body onload="onLoad(<%=CLongitude%>,<%=CLatitude%>,<%=zoom%>,<%=maptype%>)" onunload="GUnload()">
<DIV id="map" style="LEFT: 0px; WIDTH: <%=width%>px; POSITION: absolute; TOP: 0px; HEIGHT: <%=height%>px"></DIV>
</body>
</html></font id="green">
There should be an error here.
Hi José,
Zoom was not passed to the newgmaps.asp page. The initial zoom was 15 and this value was passed in all situations even when you changed it in the calling page. I added to the "moveend" event the detection of zoom and now it seems OK.
Please check again and confirm this!
Regards and thanks for calling my attention to this problem,
Luis
Zoom was not passed to the newgmaps.asp page. The initial zoom was 15 and this value was passed in all situations even when you changed it in the calling page. I added to the "moveend" event the detection of zoom and now it seems OK.
Please check again and confirm this!
Regards and thanks for calling my attention to this problem,
Luis