TextSymbol  error

493
1
05-30-2013 05:14 AM
zhangpeng
New Contributor
I want to mark many images on the map, I use PictureMarkerSymbol to draw image, that is OK. But when I use TextSnymbol to draw many texts,there is error. Then map is very slowly.Here is the code. What is the matter?

for (int i = 0; i < cjsyjbxx.size(); i++) {
    Geometry geometry = new Point(Double.valueOf(cjsyjbxx.get(i).getGIS_X()), Double.valueOf(cjsyjbxx.get(i).getGIS_Y()));
    TextSymbol ts = new TextSymbol(15f, cjsyjbxx.get(i).getSYMC(), Color.BLACK);
    ts.setHorizontalAlignment(HorizontalAlignment.center);
    ts.setOffsetY(15);
   
   
      Map<String,Object> attributes=new HashMap<String, Object>();
      attributes.put("ID", cjsyjbxx.get(i).ID);
      attributes.put("table", 2);
      attributes.put("type", 2); 
     
      Graphic gXFSs = new Graphic(geometry,imageXFS_WSPSymbol,attributes,null);     
      graphics.add(gXFSs);
     
      Graphic gXFSText = new Graphic(geometry, ts, attributes, null);
      graphics.add(gXFSText);
     }
0 Kudos
1 Reply
zhangpeng
New Contributor
no answser?
0 Kudos