开发者

Google Maps Custom Projection

I have created a custom Google Maps projection using the Google Maps Javascript API V2. It looks like this, as per the API specification:

function PProjection(levels) {

 this.fromLatLngToPixel = function(latlng, zoom) {
  ...
 };

 this.fromPixelToLatLng = function(pixel, zoom) {
  ...
 };

 this.tileCheckRange = function(tile, zoom, tilesize) {
  ...
 };

 this.getWrapWidth = function(zoom) {
  ...
 };
}

Previously, I had my version of the API set to 2.147 and everything worked fine. However, Google recently made the lowest version available 2.193. This new version breaks my projection. Whenever I try to add a 开发者_高级运维marker, I get the following error in Firebug:

d.getNearestImage is not a function

According to this post a new method called

GProjection.getNearestImage(pixel,zoom,centrepixel) 

was added in version 2.148, so it kind of makes sense that this problem would occur if I used a version of the API above 2.147. However, there is no note in the reference manual of an official change in the API. I added a dummy method of this name to my projection, but no luck. Any ideas on how to fix my projection or on how to revert to 2.147?


You can request a specific version through this method: http://groups-beta.google.com/group/google-maps-api/web/javascript-maps-api-versioning

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜