Zoom_changed - 中心

时间:2011-07-28 07:36:38

标签: javascript

Example for my Requirement Link :::当我们点击标记时它应该显示信息窗口,当我们使用滚动放大时,它应该只放大标记。当我谷歌搜索相同我发现一些代码到我的要求然后我将它集成到我的代码中,但我没有达到我的要求。以下是我的代码$ WL.Maps.Event.addListener(oMarker,“click”,function(e)

{
            if (oMarker.vehicleId !== oSelf.get($W.LiveTrack.ATTR_SELECTED_VEHICLE)) {
                oSelf.set($W.LiveTrack.ATTR_SELECTED_VEHICLE, oMarker.vehicleId);
            }
            else{
                alert('In else Block');
                oInfoWindow.drawAndMoveTo({
                    position: oMarker.getPosition(),
                    map: oGMap,
                    content: {
                    overview: oSelf._getContentOverviewTable(oVehicle),
                    details: oSelf._getContentDetailTable(oVehicle)
                }
            });
                $WL.Maps.Event.addListener(oMarker, 'zoom_changed', function() {
                    alert('In Zoom_changed Listener');
                    oGMap.setCenter(oMarker.getPosition()) });
                  });
          }
        });
    },

0 个答案:

没有答案