Opened 13 years ago

Closed 13 years ago

#468 closed defect (fixed)

Use of tiled baselayers with commercial layers

Reported by: liuar Owned by: madair
Priority: P1 Milestone: Future
Component: Widgets Version: 2.0
Severity: Major Keywords:
Cc: Browser: All
External ID: Operating System: All
state: New

Description

  1. create a map using tiled base layers
  2. add a commercial layer (Google Street) to the application definition.
  3. View the application definition in browser.
  4. Baselayers are not displayed.


Wish: Baselayers should coexist with commercial layers as long as they are defined in the same zoom level.

Change History (3)

comment:1 by madair, 13 years ago

Priority: P2P1
Status: newassigned

comment:2 by madair, 13 years ago

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

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>


comment:3 by madair, 13 years ago

Resolution: fixed
Status: assignedclosed

required changes have been committed to Fusion trunk in rev [2439]

Note: See TracTickets for help on using tickets.