Maps Error - "gen_204?imp=v3mtc.c"

2,262 views
Skip to first unread message

Nikolaj Pedersen

unread,
Oct 3, 2010, 11:01:09 AM10/3/10
to Google Maps JavaScript API v3
I get this map error, when loading my map (using google chrome java-
console).

"Failed to load resource: the server responded with a status of 404
(Not Found)
maps.googleapis.com/maps/gen_204?imp=v3mtc.c"

The map is working, but I still get the error, and it annoys me.
:)

I have the map here:
http://nikolajp.dk/ITU/Apollo/matchreplay.php?matchid=204&time=0

It's a custom map, with a lot of stuff going on to replay a match.

I can't remember when the error popped up, and I get no explanation
from the error message.
It's happening when the map is loading after being initialized.

.nikolaj

Nikolaj Pedersen

unread,
Oct 3, 2010, 11:15:54 AM10/3/10
to Google Maps JavaScript API v3
To explain where the map initialize takes place.
It's in the file:
http://nikolajp.dk/ITU/Apollo/includefiles/gplayer_lib.js

The function called initialize();

Basically I do this:

// setup google maps
canvas2 = document.getElementById('map_canvas');

var mapOptions = {
zoom: 2,
center: center,
mapTypeControlOptions: {
mapTypeIds: ['coordinate'],style:
google.maps.MapTypeControlStyle.DROPDOWN_MENU
}, navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL
}
};

map = new
google.maps.Map(document.getElementById("map_canvas"),mapOptions);

// Now attach the coordinate map type to the map's registry
map.mapTypes.set('coordinate',coordinateMapType);

// We can now set the map to use the 'coordinate' map type
map.setMapTypeId('coordinate');





I define the coordinate type here:

function CoordMapType() {}

CoordMapType.prototype.tileSize = new google.maps.Size(256,256);
CoordMapType.prototype.maxZoom = 4;
CoordMapType.prototype.minZoom = 2;

CoordMapType.prototype.getTile = function(coord, zoom, ownerDocument)
{
var div = ownerDocument.createElement('DIV');
// document.write("layer"+(4-zoom)+"/"+coord.x+"_"+coord.y+"_"+(4-
zoom)+".png'"+">");
var TileNumbersAtZoomLevel = Math.pow(2,zoom);

var Xpos = coord.x;
var Ypos = coord.y;

// if out-of-X range then adjust value. We only extend map image on
the X-axis.
if(Xpos < 0)
{Xpos = (Xpos%TileNumbersAtZoomLevel)+TileNumbersAtZoomLevel;}

if(Xpos >= TileNumbersAtZoomLevel)
{Xpos = Xpos%TileNumbersAtZoomLevel;}

// if out-of-Y range then show blank image - else show proper image
if(Ypos >= TileNumbersAtZoomLevel || Ypos < 0)
{
div.innerHTML = "<img src='mapimages/minimapimage2/blank.png'>";
}
else
{
div.innerHTML = "<img src='mapimages/minimapimage2/layer"+zoom
+"/"+Xpos+"_"+Ypos+"_"+zoom+".png'"+">";
}
//div.innerHTML = "<img src='mapimages/minimapimage2/
layer4/0_0_4.png'>";
return div;
};

CoordMapType.prototype.name = "Apollo";
CoordMapType.prototype.alt = "Tile Coordinate Map Type";

var coordinateMapType = new CoordMapType();

Nikolaj Pedersen

unread,
Oct 4, 2010, 3:12:28 AM10/4/10
to Google Maps JavaScript API v3
It is happening in the official Google example that I followed!

http://code.google.com/apis/maps/documentation/javascript/examples/maptype-base.html

If you inspect this using the Chrome Javascript Console, you get the
same error as above.
I found out it was tied to setting some GUI control in the map
options.

If I remove this from the mapoptions .. there is no error.
----------------------------
mapTypeControlOptions: {
mapTypeIds: ['coordinate', google.maps.MapTypeId.ROADMAP],
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
}
---------------------------------

.. but the dropdown is not set ofcourse.

Even if I remove the 'coordinate' type, it still gives an error.

Anybody has a clue, as to what is wrong?

.nikolaj

Ben Appleton

unread,
Oct 4, 2010, 7:12:25 PM10/4/10
to google-map...@googlegroups.com
Thanks for the report, we're deleting the call.

- Ben


--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.


Reply all
Reply to author
Forward
0 new messages