Opened 12 years ago

Closed 12 years ago

#2233 closed defect (fixed)

Maestro API 4.0.4 - missing display scales

Reported by: hm Owned by:
Priority: low Milestone: Maestro-4.0-maintenance
Component: General Version: 2.2.0
Severity: minor Keywords: Scale Range
Cc: External ID:

Description

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.Layerslandparcels.ScaleRanges[0].MinScale is 0.0 map.Layerslandparcels.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.

Change History (1)

comment:1 by jng, 12 years ago

Resolution: fixed
Status: newclosed

Fixed trunk (r7506) and 4.0.x (r7503 and r7505)

Note: See TracTickets for help on using tickets.