报错如下:
代码:
Point2D center = new Point2D();
center.setY(y);
center.setX(x);
Log.e("XXXX",x+"");
Log.e("XXXY",y+"");
//创建点对象
GeoPoint geoPoint =new GeoPoint(center.getX(),center.getY());
TrackingLayer trackingLayer = mMapControl.getMap().getTrackingLayer();
GeoStyle pointStyle = geoPoint.getStyle();
if (pointStyle == null)
pointStyle = new GeoStyle();
pointStyle.setMarkerSize(new Size2D(6, 6));
pointStyle.setMarkerSymbolID(0);
pointStyle.setLineColor(new Color(231, 8, 73));
geoPoint.setStyle(pointStyle);
trackingLayer.add(geoPoint, "point1");
parameter.setQueryGeomety(geoPoint);
service.query(parameter, QueryMode.SpatialQuery );//使用空间查询