I used this link for showing more location but when I scroll the map, then marker does not scroll, i.e. the position is static. Please help me.
Asked
Active
Viewed 242 times
1 Answers
0
Use this:
map = new MapField(){
public void paint(Graphics g){
super.paint(g);
for(int i=0;i<=_longitude.size()-1;i++){
Coordinates coords = getCoordinates();
coords.setLatitude(Double.parseDouble((String) _latitude.elementsAt(i));
coords.setLongitude(Double.parseDouble((String) _longitude.elementsAt(i));
convertWorldToField(coords,_xypoint);
g.drawBitmap(_xypoint.x,_xypoint.y,_loc.getWidth(),_loc.getHeight(),_loc, 0, 0);
}
}
Note: _latitude and _longitude are the vectors containing respective values , this will make the markers that are not static.

Himanshu Sharma
- 43
- 2