1

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.

Community
  • 1
  • 1
moon
  • 51
  • 1
  • 4

1 Answers1

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.