Mapfield has a paint method that allows you to paint graphics onto the mapfield object. Thus, the layering method was not required, and it was possible to directly drop bitmap resource (i.e. image files, dots, etc.) directly onto the map.
I created a child class of Mapfield (i.e. class mod_map extends Mapfield) and declared the paint method as seen below. This method executes when the object is created, thus requires the vector object "_poi" to be passed into the constructor in the beginning itself.
I've attached my code below, and i beleive its pretty self explanatory. "red_marker" and "cursor" are .png resource i'm using to drop red points on the map
Code:
public void paint (Graphics g)
{
super.paint(g);
// Place a cursor permanently at the center of the map.
int width = getPreferredWidth();
int height = getPreferredHeight();
g.drawBitmap((width/2), (height/2), width, height, cursor, 0, 0);
// Draw the POI's onto the map
if ( _poi != null ) {
for (int i = _poi.size() - 1 ; i >= 0 ; --i) {
XYPoint temp_xy = new XYPoint();
pointOfInterest temp = (pointOfInterest) _poi.elementAt(i);
convertWorldToField(temp.lat_long, temp_xy);
g.drawBitmap(temp_xy.x, temp_xy.y, width, height, red_marker, 0, 0);
}
}
}