Hi everyone I tried using the Custom MapField to show several loacations on map. I am able to show the locations on map. But not able to move the image and also cant zoom in and zoom out.i tried using custom MapField but still it is not working for me.. Here is my code for that
class CustomMapField extends MapField
{
Bitmap mIcon;
XYRect mDest;
public void moveTo(Coordinates coordinates)
{
super.moveTo(coordinates);
mDest = null;
}
protected void paint(Graphics graphics)
{
super.paint(graphics);
if (null != mIcon)
{
if (null == mDest)
{
XYPoint fieldOut = new XYPoint();
convertWorldToField(getCoordinates(), fieldOut);
int imgW = mIcon.getWidth();
int imgH = mIcon.getHeight();
mDest = new XYRect(fieldOut.x - imgW / 2,fieldOut.y - imgH, imgW, imgH);
}
graphics.drawBitmap(mDest, mIcon, 0, 0);
}
}
}