[Mapguide-trac] [mapguide-trac] #2233: Maestro API 4.0.4 - missing display scales
MapGuide Open Source
trac_mapguide at osgeo.org
Mon Mar 18 00:56:24 PDT 2013
#2233: Maestro API 4.0.4 - missing display scales
-----------------------+----------------------------------------------------
Reporter: hm | Owner:
Type: defect | Status: new
Priority: low | Milestone: Maestro-4.0-maintenance
Component: General | Version: 2.2.0
Severity: minor | Keywords: Scale Range
External_id: |
-----------------------+----------------------------------------------------
Using Maestro API 4.0.4 and MGOS2.2 I have a problem when creating a
runtime map. The display scales are not set correctly.
I have a land parcel layer in the map where the scale range has been set
to 0:5000
The source code is:
IMapDefinition mdef =
(IMapDefinition)con.ResourceService.GetResource("library://maps/testmap.mapdefinition");
IMappingService mSvc =
(IMappingService)con.GetService((int)ServiceType.Mapping);
RuntimeMap map = mSvc.CreateMap(mdef);
map.Save();
If I then check the layer display scales they are not correct:
map.Layers["landparcels"].ScaleRanges[0].MinScale is 0.0
map.Layers["landparcels"].ScaleRanges[0].MaxScale is
1.7976931348623157E+308
In other words, it is infinite instead of 5000.
If I check the IMapDefinition i cannot see that the layers in the basemap
contain any information about layer scale ranges, so perhaps the problem
is that the mapdefinition does not contain the scale ranges to be
duplicated when creating the runtime map.
I did not check if Maestro 5 has the same issue, but if so please fix both
v4 and v5.
I made a workaround by getting the ILayerDefinition from the layers
LayerDefinitionID (using ResourceService.GetResource()). Then I can cast
it to a IVectorLayerDefinition and read the VectorScaleRange property.
--
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/2233>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list