I can't really put this problem in a topic-like description, hence the
cryptic subject.

I'm implementing a custom GTileLayer, GProjection and GMaptype. By now
everything is running fine and smooth but there appears to be a small
bug that randomly occurs.

This is part of my projection (subclass of GProjection):

MyProjection.prototype.fromLatLngToPixel = function(latlng, intZoom) {
        if (!latlng) {
                // is this some bug or bad implementation?
                GLog.write("empty latlng... "+intZoom);
                return new GPoint();
        }
        var pixelsPerDegree = this.edgepixels[intZoom] / 360;
  var x = Math.round(latlng.lng() * pixelsPerDegree);
  var y = Math.round(latlng.lat() * pixelsPerDegree);
  return new GPoint(x, y)
};

As you can see, there's an if statement there. Every now and, I can't
create a working repro, when I zoom in/out (mousewheel) the latlng
argument will be null.

I've tried to track this problem back in the API but I got lost in the
obfuscation.
The error that is raised is probably due to the bogus GPoint. The
error seems to occur when I try to zoom after being idle a few seconds
(but this is not constant).

I would post a link, but there are bandwidth issues that have to be
resolved. For now I'm just wondering whether anyone knows about this
problem, or knows what's going wrong.
The problem does not occur in the fromPixelToLatLng method, which
works symmetrical.

Note that I'm able to traverse through the map perfectly fine except
for this occasional error. In explorer7 this will b0rk once the error
occurs, Firefox will continue.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to