05-19-2011 04:21 AM
When you get the grey area, did you try to zoom out and check if the map is rendered properly?
You do not have setZoom in RichMapField.
Is your requirements is to show only one point of interest on the map?
05-19-2011 06:01 AM
The RichMapField has the property to set the Zooming level adjust automatically to show the Pointers display on the blackberry device screen.
In the case you have tried, you have only one pointer and the RichMapField has applied the Maximum zoom to it. That is the reason you get your pointer in grey area.
If you use more than one pointers, the zoom level is adjusted to show all the pointers on the device screen and this case you will not face the grey issue as that pointers might be atleast some distance away from eachother.
So I would suggest you to proceed with multiple pointers.
rMap.getMapField().update( true ); --> This is the code to update the zooming level automatically according to the device screen. This is special feature of RichMapField. If you dont want that, you can make it false
05-19-2011 06:24 AM
05-19-2011 06:34 AM
The Zoom Level varies from 0 and 15.
0 -- Means Maximum Zoom out
15 -- Means Maximum Zoom in (This 15 was set in ur case and you got the grey area on the screen)
Could you try the below code by giving the DEFAULT_LAT,DEFAULT_LONG value as the latitude and longitude that you mentioned above (So that your location is centeralised on the device screen) and zoom level as 14 or 13.
05-19-2011 08:17 AM
Does this solve your issue?
05-19-2011 09:35 AM
05-19-2011 09:48 AM
To be very clear, map.getMapField().update( true); is used to automatically set the center and zooming factor.
But in your case when you want that to be pre defined using action.setCentreAndZoom(new MapPoint(DEFAULT_LAT,DEFAULT_LONG),13); (where the DEFAULT_LAT= 51.060130,DEFAULT_LONG=-1.339557
) you should not give the update value as true.
Means, map.getMapField().update( false); should be used
05-19-2011 09:50 AM