[fusion-trac] #468: Use of tiled baselayers with commercial layers

Fusion trac_fusion at osgeo.org
Fri Oct 21 15:33:27 EDT 2011


#468: Use of tiled baselayers with commercial layers
-----------------------+----------------------------------------------------
   Reporter:  liuar    |       Owner:  madair  
       Type:  defect   |      Status:  assigned
   Priority:  P1       |   Milestone:  Future  
  Component:  Widgets  |     Version:  2.0     
   Severity:  Major    |    Keywords:          
External_id:           |       State:  New     
    Browser:  All      |          Os:  All     
-----------------------+----------------------------------------------------

Comment(by madair):

 I was able to get this to work with the following steps:

 - with Maestro, set up the tiled layer so that it has the same scale
 levels (finite display scales) as the google layer, if you don't specify
 the lowest scales, specify a zoomOffset in the layer options in AppDef.

 e.g. using the set of scales:

 {{{
 1128.50004257674
 2257.00008515349
 4514.00017030697
 9028.00034061395
 18056.0006812279
 36112.0013624558
 72224.0027249116
 144448.005449823
 288896.010899646
 577792.021799293
 1155584.04359859


 }}}
 use a zoomOffset of 9


 - with Maestro, set the coordinate system to spherical mercator:

 {{{
 PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["Popular Visualisation
 CRS",DATUM["Popular_Visualisation_Datum",SPHEROID["Popular Visualisation
 Sphere",6378137,0],TOWGS84[0,0,0,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["degree",0.01745329251994328]],UNIT["m",1],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AXIS["X",EAST],AXIS["Y",NORTH]]

 }}}
 I had to do this in the XML editor because the WKT is not available in the
 drop downs

 - in Fusion Mapguide layer, don't set the DPI value to 96 but use the
 OpenLayers default

 - OpenLayers MapGuide layer is patched to support the zoomOffset property


 Then using the following MapGroup in AppDef, we can get MapGuide tiled
 layer overlaid on the Google layer:

 {{{
     <MapGroup id="ticket468">
       <InitialView>
           <MinX>-9774168</MinX>
           <MinY>5415995</MinY>
           <MaxX>-9754637</MaxX>
           <MaxY>5434757</MaxY>
       </InitialView>
       <Map>
         <Type>Google</Type>
         <Extension>
           <ResourceId>google</ResourceId>
           <Options>
             <name>GoogleLayer</name>
             <type>G_PHYSICAL_MAP</type>
             <isBaseLayer>true</isBaseLayer>
             <sphericalMercator>true</sphericalMercator>
           </Options>
         </Extension>
       </Map>
       <Map id="mg1">
         <Type>MapGuide</Type>
         <SingleTile>false</SingleTile>
         <Extension>
 <ResourceId>Library://Samples/Sheboygan/MapsTiled/SheboyganSphericalMerc.MapDefinition</ResourceId>
           <Options>
              <isBaseLayer>false</isBaseLayer>
              <useOverlay>true</useOverlay>
              <zoomOffset>9</zoomOffset>
           </Options>
         </Extension>
       </Map>
     </MapGroup>


 }}}

-- 
Ticket URL: <http://trac.osgeo.org/fusion/ticket/468#comment:2>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.


More information about the fusion-trac mailing list