Google Maps API 2.0解析(14-接口方法定义)

        Google为了进行代码混淆和压缩,将代码进行了变量替换,不过不管怎么替换,接口方法总要对外公开的,这儿就是进行公开的一些代码,需要注意的是这些代码在我转化之前是非常乱的,我就是根据这儿的代码进行反混淆分析的。
 
             var  a;
            
// GMap2由GMapBase继承而生成
             // g参数是一个GMapOptions,并没有在Google Maps里面定义,就通过mapTypes属性和size属性使用,因此,不能new
             function  GMap2(f,g)
            
{
                g
=g||{};
                GMapBase.call(
this,f,g.mapTypes,g.size)
            }

            InheritClass(GMap2,GMapBase);
            setWindows(
" GMap2 " ,GMap2);
            a
= GMapBase.prototype;
            setPrototype(GMapBase,
" getCenter " ,a.getCenter);
            setPrototype(GMapBase,
" setCenter " ,a.setCenter);
            setPrototype(GMapBase,
" setFocus " ,a.setFocus);
            setPrototype(GMapBase,
" getBounds " ,a.getBounds);
            setPrototype(GMapBase,
" getZoom " ,a.getZoom);
            setPrototype(GMapBase,
" setZoom " ,a.setZoom);
            setPrototype(GMapBase,
" zoomIn " ,a.zoomIn);
            setPrototype(GMapBase,
" zoomOut " ,a.zoomOut);
            setPrototype(GMapBase,
" getCurrentMapType " ,a.getCurrentMapType);
            setPrototype(GMapBase,
" getMapTypes " ,a.getMapTypes);
            setPrototype(GMapBase,
" setMapType " ,a.setMapType);
            setPrototype(GMapBase,
" addMapType " ,a.addMapType);
            setPrototype(GMapBase,
" removeMapType " ,a.removeMapType);
            setPrototype(GMapBase,
" getSize " ,a.getSize);
            setPrototype(GMapBase,
" panBy " ,a.panBy);
            setPrototype(GMapBase,
" panDirection " ,a.panDirection);
            setPrototype(GMapBase,
" panTo " ,a.panTo);
            setPrototype(GMapBase,
" addOverlay " ,a.addOverlay);
            setPrototype(GMapBase,
" removeOverlay " ,a.removeOverlay);
            setPrototype(GMapBase,
" clearOverlays " ,a.clearOverlays);
            setPrototype(GMapBase,
" getPane " ,a.getPane);
            setPrototype(GMapBase,
" addControl " ,a.addControl);
            setPrototype(GMapBase,
" removeControl " ,a.removeControl);
            setPrototype(GMapBase,
" showControls " ,a.showControls);
            setPrototype(GMapBase,
" hideControls " ,a.hideControls);
            setPrototype(GMapBase,
" checkResize " ,a.checkResize);
            setPrototype(GMapBase,
" getContainer " ,a.getContainer);
            setPrototype(GMapBase,
" getBoundsZoomLevel " ,a.getBoundsZoomLevel);
            setPrototype(GMapBase,
" savePosition " ,a.savePosition);
            setPrototype(GMapBase,
" returnToSavedPosition " ,a.returnToSavedPosition);
            setPrototype(GMapBase,
" isLoaded " ,a.isLoaded);
            setPrototype(GMapBase,
" disableDragging " ,a.disableDragging);
            setPrototype(GMapBase,
" eGEvent_moveendbleDragging " ,a.eGEvent_moveendbleDragging);
            setPrototype(GMapBase,
" draggingEGEvent_moveendbled " ,a.draggingEGEvent_moveendbled);
            setPrototype(GMapBase,
" fromContainerPixelToLatLng " ,a.fromContainerPixelToLatLng);
            setPrototype(GMapBase,
" fromDivPixelToLatLng " ,a.fromDivPixelToLatLng);
            setPrototype(GMapBase,
" fromLatLngToDivPixel " ,a.fromLatLngToDivPixel);
            
// GMapPane枚举的定义
            setWindows( " G_MAP_MAP_PANE " , 0 );
            setWindows(
" G_MAP_MARKER_SHADOW_PANE " , 1 );
            setWindows(
" G_MAP_MARKER_PANE " , 3 );
            setWindows(
" G_MAP_FLOAT_SHADOW_PANE " , 4 );
            setWindows(
" G_MAP_MARKER_MOUSE_TARGET_PANE " , 5 );
            setWindows(
" G_MAP_FLOAT_PANE " , 6 );
            a
= GMapBase.prototype;
            setPrototype(GMapBase,
" openInfoWindow " ,a.openInfoWindow);
            setPrototype(GMapBase,
" openInfoWindowHtml " ,a.openInfoWindowHtml);
            setPrototype(GMapBase,
" openInfoWindowTabs " ,a.openInfoWindowTabs);
            setPrototype(GMapBase,
" openInfoWindowTabsHtml " ,a.openInfoWindowTabsHtml);
            setPrototype(GMapBase,
" showMapBlowup " ,a.showMapBlowup);
            setPrototype(GMapBase,
" getInfoWindow " ,a.getInfoWindow);
            setPrototype(GMapBase,
" closeInfoWindow " ,a.closeInfoWindow);
            setPrototype(GMapBase,
" eGEvent_moveendbleInfoWindow " ,a.eGEvent_moveendbleInfoWindow);
            setPrototype(GMapBase,
" disableInfoWindow " ,a.disableInfoWindow);
            setPrototype(GMapBase,
" infoWindowEGEvent_moveendbled " ,a.infoWindowEGEvent_moveendbled);
            setWindows(
" GKeyboardHandler " ,GKeyboardHandler);
            setWindows(
" GInfoWindowTab " ,GInfoWindowTab);
            a
= V.prototype;
            setPrototype(V,
" selectTab " ,a.selectTab);
            setPrototype(V,
" hide " ,a.hide);
            setPrototype(V,
" show " ,a.show);
            setPrototype(V,
" isHidden " ,a.isHidden);
            setPrototype(V,
" reset " ,a.reset);
            setPrototype(V,
" getPoint " ,a.getPoint);
            setPrototype(V,
" getPixelOffset " ,a.getPixelOffset);
            setPrototype(V,
" getSelectedTab " ,a.getSelectedTab);
            setWindows(
" GOverlay " ,GOverlay);
            SetProperty(GOverlay,
" getZIndex " ,getZIndex);
            setWindows(
" GMarker " ,GMarker);
            a
= GMarker.prototype;
            setPrototype(GMarker,
" openInfoWindow " ,a.openInfoWindow);
            setPrototype(GMarker,
" openInfoWindowHtml " ,a.openInfoWindowHtml);
            setPrototype(GMarker,
" openInfoWindowTabs " ,a.openInfoWindowTabs);
            setPrototype(GMarker,
" openInfoWindowTabsHtml " ,a.openInfoWindowTabsHtml);
            setPrototype(GMarker,
" showMapBlowup " ,a.showMapBlowup);
            setPrototype(GMarker,
" getGEvent_infowindowopenon " ,a.getGEvent_infowindowopenon);
            setPrototype(GMarker,
" getPoint " ,a.getPoint);
            setPrototype(GMarker,
" setPoint " ,a.setPoint);
            setWindows(
" GPolyline " ,GPolyline);
            a
= GPolyline.prototype;
            setPrototype(GPolyline,
" getPoint " ,a.getPoint);
            setPrototype(GPolyline,
" getNumPoints " ,a.getNumPoints);
            SetProperty(GPolyline,
" fromEncoded " ,fromEncoded);
            setWindows(
" GGEvent_infowindowopenon " ,GGEvent_infowindowopenon);
            setWindows(
" G_DEFAULT_ICON " ,G_DEFAULT_ICON);
            
function  GEvent()
            
{
            }

            setWindows(
" GEvent " ,GEvent);
            SetProperty(GEvent,
" addListener " ,addListener);
            SetProperty(GEvent,
" addDomListener " ,addDomListener);
            SetProperty(GEvent,
" removeListener " ,removeListener);
            SetProperty(GEvent,
" clearListeners " ,clearListeners);
            SetProperty(GEvent,
" clearInstanceListeners " ,clearInstanceListeners);
            SetProperty(GEvent,
" clearNode " ,clearNode);
            SetProperty(GEvent,
" trigger " ,trigger);
            SetProperty(GEvent,
" bind " ,bind);
            SetProperty(GEvent,
" bindDom " ,bindDom);
            SetProperty(GEvent,
" callback " ,callback);
            SetProperty(GEvent,
" callbackArgs " ,callbackArgs);
            
function  GXmlHttp()
            
{
            }

            setWindows(
" GXmlHttp " ,GXmlHttp);
            SetProperty(GXmlHttp,
" create " ,create);
            setWindows(
" GDownloadUrl " ,GDownloadUrl);
            setWindows(
" GPoint " ,GPoint);
            a
= GPoint.prototype;
            setPrototype(GPoint,
" equals " ,a.equals);
            setPrototype(GPoint,
" toString " ,a.toString);
            setWindows(
" GSize " ,GSize);
            a
= GSize.prototype;
            setPrototype(GSize,
" equals " ,a.equals);
            setPrototype(GSize,
" toString " ,a.toString);
            setWindows(
" GBounds " ,GBounds);
            a
= GBounds.prototype;
            setPrototype(GBounds,
" toString " ,a.toString);
            setPrototype(GBounds,
" min " ,a.min);
            setPrototype(GBounds,
" max " ,a.max);
            setPrototype(GBounds,
" containsBounds " ,a.containsBounds);
            setPrototype(GBounds,
" extend " ,a.extend);
            setPrototype(GBounds,
" intersection " ,a.intersection);
            setWindows(
" GLatLng " ,GLatLng);
            a
= GLatLng.prototype;
            setPrototype(GLatLng,
" equals " ,a.equals);
            setPrototype(GLatLng,
" toUrlValue " ,a.toUrlValue);
            setPrototype(GLatLng,
" lat " ,a.lat);
            setPrototype(GLatLng,
" lng " ,a.lng);
            setPrototype(GLatLng,
" latRadians " ,a.latRadians);
            setPrototype(GLatLng,
" lngRadians " ,a.lngRadians);
            setPrototype(GLatLng,
" distanceFrom " ,a.distanceFrom);
            setWindows(
" GLatLngBounds " ,GLatLngBounds);
            a
= GLatLngBounds.prototype;
            setPrototype(GLatLngBounds,
" equals " ,a.equals);
            setPrototype(GLatLngBounds,
" contains " ,a.contains);
            setPrototype(GLatLngBounds,
" intersects " ,a.intersects);
            setPrototype(GLatLngBounds,
" containsBounds " ,a.containsBounds);
            setPrototype(GLatLngBounds,
" extend " ,a.extend);
            setPrototype(GLatLngBounds,
" getSouthWest " ,a.getSouthWest);
            setPrototype(GLatLngBounds,
" getNorthEast " ,a.getNorthEast);
            setPrototype(GLatLngBounds,
" toSpan " ,a.toSpan);
            setPrototype(GLatLngBounds,
" isFullLat " ,a.isFullLat);
            setPrototype(GLatLngBounds,
" isFullLng " ,a.isFullLng);
            setPrototype(GLatLngBounds,
" isEmpty " ,a.isEmpty);
            setWindows(
" GCopyrightCollection " ,GCopyrightCollection);
            a
= GCopyrightCollection.prototype;
            setPrototype(GCopyrightCollection,
" addCopyright " ,a.addCopyright);
            setPrototype(GCopyrightCollection,
" getCopyrights " ,a.getCopyrights);
            setWindows(
" GTileLayer " ,GTileLayer);
            setWindows(
" GMapType " ,GMapType);
            setPrototype(GMapType,
" getBoundsZoomLevel " ,GMapType.prototype.getBoundsZoomLevel);
            setPrototype(GMapType,
" getSpanZoomLevel " ,GMapType.prototype.getSpanZoomLevel);
            setWindows(
" GControlPosition " ,GControlPosition);
            
// GControlAnchor 枚举的定义
            setWindows( " G_ANCHOR_TOP_RIGHT " , 1 );
            setWindows(
" G_ANCHOR_TOP_LEFT " , 0 );
            setWindows(
" G_ANCHOR_BOTTOM_RIGHT " , 3 );
            setWindows(
" G_ANCHOR_BOTTOM_LEFT " , 2 );
            setWindows(
" GControl " ,GControl);
            setWindows(
" GScaleControl " ,GScaleControl);
            setWindows(
" GLargeMapControl " ,GLargeMapControl);
            setWindows(
" GSmallMapControl " ,GSmallMapControl);
            setWindows(
" GSmallZoomControl " ,GSmallZoomControl);
            setWindows(
" GMapTypeControl " ,GMapTypeControl);
            setWindows(
" GOverviewMapControl " ,GOverviewMapControl);
            a
= GOverviewMapControl.prototype;
            setPrototype(GOverviewMapControl,
" getOverviewMap " ,a.getOverviewMap);
            setPrototype(GOverviewMapControl,
" show " ,a.show);
            setPrototype(GOverviewMapControl,
" hide " ,a.hide);
            setWindows(
" GProjection " ,GProjection);
            setWindows(
" GMercatorProjection " ,GMercatorProjection);
            
// 地图上用来进行调试输出的对象
             function  GLog()
            
{
            }

            setWindows(
" GLog " ,GLog);
            SetProperty(GLog,
" write " , function (f,g)
            
{
                GLogBase.instance().write(f,g)
            }
);
            SetProperty(GLog,
" writeUrl " , function (f)
            
{
                GLogBase.instance().writeUrl(f)
            }
);
            SetProperty(GLog,
" writeHtml " , function (f)
            
{
                GLogBase.instance().writeHtml(f)
            }
)

你可能感兴趣的:(google maps api)