您好请问我这样加动态图层,会在
dynamicView.addElement(dynamicPoint);这句抛异常boolean com.supermap.mapping.MapDynParams.isCacheEnabled()' on a null object reference,后边还跟个下标越界的错
我的代码是这样的,先清除了所有
mapView.removeAllDynamicView();
之后如下
DynamicView dynamicView = new DynamicView(getActivity(), mapView.getMapControl().getMap());
mapView.addDynamicView(dynamicView);
DynamicPoint dynamicPoint = new DynamicPoint();
double lon = Double.parseDouble(data.get(i).getLongtitude());
double lat = Double.parseDouble(data.get(i).getLatitude());
Point2D point = new Point2D(lon, lat);
dynamicPoint.setStyle(dynamicStyle);
dynamicPoint.addPoint(point);
dynamicView.addElement(dynamicPoint);