Get DPI from MapView

2889
3
03-19-2012 12:00 AM
SimonKlein
Occasional Contributor
Hi,

is there a way to get the DPI from the MapView?
I need it for a parameter of a IdentifyParameters object.
In the the IdentifiyTask Sample it is hardcoded with 96.


Thanks!
0 Kudos
3 Replies
IvanBespalov
Occasional Contributor III
0 Kudos
SimonKlein
Occasional Contributor
Thanks, but this gives me not really the DPI of the MapView. It only provides the general DPI of the device ( DENSITY_DEFAULT, DENSITY_HIGH, etc.) which are just 160,240,etc. and not the normal DPI of the MapView. In the Windows Phone and the IOS API versions there is something like MapView.getDPI().
So I am a little confused if I should just also use the hardcoded 96dpi or do it the DisplayMetrics way.
Recommendations?
0 Kudos
IvanBespalov
Occasional Contributor III
I'm not sure, and I can't test it, as the result i do not understand what is it? - getResolution()
Gets the   resolution of the Layer.


and

But may be ... setDPI(int)
Sets the dot-per-inch of the map (used to determine the   resolution of the map).


Are the same things... :confused:

I'm not sure. I have no SDK installed on current working machine - I can't try it.
0 Kudos