[mapguide-users] Maestro API 4 - RunTimeMap has no display scales on layers

Hans Milling hm at geograf.dk
Fri Mar 15 05:13:53 PDT 2013


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.mapdef");
      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 isntead of 5000.
If I check the IMadDefinition i cannot see that the layers in the basemap
contain any information about layer scale ranges, so perhaps the problem is
that the mapdefinition then cannot duplicate the scale ranges.

Have I found a bug or is the way I do this wrong?

Best regards
  Hans Milling...




--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Maestro-API-4-RunTimeMap-has-no-display-scales-on-layers-tp5040619.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list