map.units support in agslib-3.0pre-2012-03-15

1250
12
04-15-2012 08:40 PM
TomSchuller
Occasional Contributor III
Hy,
I just wanted to migrate some widgets to the FlexViewer3.0.
Unfortantly, I'm blocked by the property "units" in the "Map" class.

In the "What's new" and "Migrating 2.5 to 3.0", I dont' find anything about a change on that property:
  http://resourcesbeta.arcgis.com/en/help/flex-api/concepts/index.html#/What_s_new_in_ArcGIS_API_for_F...
  http://resourcesbeta.arcgis.com/en/help/flex-api/concepts/index.html#/Migrating_from_2_5_to_3_0/017p...

In the API reference, I don't find a description for units:
http://resourcesbeta.arcgis.com/en/help/flex-api/apiref/com/esri/ags/Map.html#units
On the other side, reading the doc of the scale property, there is a relation to "units":
http://resourcesbeta.arcgis.com/en/help/flex-api/apiref/com/esri/ags/Map.html#scale

Is this a bug of a missed property or an undocumented change in the 3.0 api.

Thanks,
Tom
Tags (2)
0 Kudos
12 Replies
TomSchuller
Occasional Contributor III
Hy,
I have written an advanced PrintWidget for the viewer.

You can find a demo here: http://gis.pch.etat.lu/flexViewerPrint/
The backend is a custom SOE.
The sources can be found here: http://bitbucker.schuller.lu

In fact, I need the "map.units" to calculate the current map extent based on the paper format and the map scale.
  ?? mapUnits =  x paperUnits * mapScale

Tom
0 Kudos
TomSchuller
Occasional Contributor III
Hy,
did you have news if you reintegrate the property in the final Flex API version?

Tom
0 Kudos
DasaPaddock
Esri Regular Contributor
Tom,

You can use Ivan's suggestion of getting the units from the first layer in the Map. This is all the Map was doing before unless it was explicitly set.

See:
http://forums.arcgis.com/threads/55275-map.units-support-in-agslib-3.0pre-2012-03-15?p=189991&viewfu...
0 Kudos