Hi,

There's indeed no configuration option to set the maxZoomLevel. The problem is that OpenLayers has hardcoded that the maximum zoom level is 19 and setting a configuration option to go beyond this has no effect. Unless they have changed the behavior since I wrote the code, the only way to get past this limitation is to look for the MAX_ZOOM_LEVEL variable in openlayers and replace it with the desired value.
And do the same in Mapbuilder:
MapPaneOL.js line 352
baseLayer = new OpenLayers.Layer.Google( baseLayerName , {type: baseLayerType, minZoomLevel: 0, maxZoomLevel:19, sphericalMercator: sphericalMercator }, baseLayerOptions );
          objRef.model.map.numZoomLevels = 20;

So yes it is a bug but it also requires a fix upstream.

Regards,
Steven

On Jan 29, 2008, at 10:29 AM, Toan Nguyen wrote:

I have checked in config.xml and google.xml, I don't see any param to set max scale.

google.xml file:
<?xml version="1.0" encoding="utf-8" standalone="no" ?>

<OWSContext version="0.0.13"
    id="ows-context-tie"

    xmlns="http://www.opengis.net/context";
    xmlns:xlink="http://www.w3.org/1999/xlink";

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xmlns:sld="http://www.opengis.net/sld";

    xmlns:ogc="http://www.opengis.net/ogc";
    xmlns:ows="http://www.opengis.net/ows";

    xmlns:param="http;//www.opengis.net/param"
    xsi:schemaLocation="http://www.opengis.net/oc oc_0_0_13.xsd">

  <General>
    <Window width="500" height="300"/>

    <ows:BoundingBox crs="EPSG:900913">
      <ows:LowerCorner>-20037508.34 -20037508.34</ows:LowerCorner>

      <ows:UpperCorner>20037508.34 20037508.34</ows:UpperCorner>
    </ows:BoundingBox>            
    <Title>OWS context with Google</Title>

<Abstract> The OGC Web Services Context Document with google baselayer (mapbuilder only ATM)</Abstract>
  </General>

  <ResourceList>
    <ows:BaseLayer>
      <Server service="Google"/>

      <Name>GoogleHybrid</Name>
      <ows:TileSet>
        <!--ows:resolutions/-->

        <ows:SRS>EPSG:900913</ows:SRS>
<ows:BoundingBox SRS="EPSG:900913" minx="11875944.65" miny="1206711.65" maxx="11885793.53" maxy="1215960.25"/>

        <ows:Layers>hybrid</ows:Layers>
        <!-- <ows:Width/> -->
        <!-- <ows:Format/> -->

      </ows:TileSet>
    </ows:BaseLayer>      
  </ResourceList>
</OWSContext>


And config.xml file:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<MapbuilderConfig version="0.2.1" id="simpleTemplate"

  xmlns="http://mapbuilder.sourceforge.net/mapbuilder";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

xsi:schemaLocation="http://mapbuilder.sourceforge.net/ mapbuilder ../../lib/schemas/config.xsd">

  <models>
    <OwsContext id="mainMap">
      <defaultModelUrl>../data/context/google.xml</defaultModelUrl>

      <widgets>
        <MapPaneOL id="mainMapWidget">
          <htmlTagId>mainMapPane</htmlTagId>

        </MapPaneOL>
       <PanZoomBar id="panZoomBar"/>

           <CursorTrack id="cursorTrack">
          <showXY>true</showXY>

          <showLatLong>false</showLatLong>
          <precision>2</precision>

        </CursorTrack>
                <MapScaleText id="scaleText"></MapScaleText>

      </widgets>
      <tools>
        <History id="extentHistory"/>

        </tools>
<nodeSelectXpath>/wmc:ViewContext/wmc:LayerList/wmc:Layer</ nodeSelectXpath>
    </OwsContext>

  </models>

  <widgets>
         .........
  </widgets>
  <skinDir>../../lib/skin/default</skinDir>

  <widgetTextUrl>widgetText.xml</widgetTextUrl>
  <!-- relative to the skin dir -->
</MapbuilderConfig>



--
   Nguyễn Đình Toán

-------------------------
Neu khong doc duoc tieng Viet, vui long vao menu View --> chon Encoding --> chon Unicode (UTF-8). Cam on. ---------------------------------------------------------------------- ---
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________
Mapbuilder-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-users

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mapbuilder-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-users

Reply via email to