var geometry = new SuperMap.Web.Core.GeoPoint3D(new SuperMap.Web.Core.Point3D(longitude, latitude, height));
var feature3D = new SuperMap.Web.Core.Feature3D();
//设备路径
var Pictureurl = "http://" + document.location.host + "/Source/mark.png";
//设置样式
var style = new SuperMap.Web.Core.Style3D();
style.set_markerFile(Pictureurl)
//设置高度模式
style.set_altitudeMode(SuperMap.Web.Realspace.AltitudeMode.RELATIVE_TO_GROUND);
var geoPlacemark = new SuperMap.Web.Core.GeoPlacemark()
geoPlacemark.set_name("你好")
geoPlacemark.set_geometry(geometry)
feature3D.set_geometry(geoPlacemark)
feature3D.set_style3D(style)
var placemarkfeature3D = new SuperMap.Web.Core.Feature3D();
placemarkfeature3D.set_geometry(geoPlacemark);
var trackingLayer = csm.scene.get_trackingLayer3D();
//跟踪图层设置为可见
trackingLayer.set_isVisible(true);
trackingLayer.add(feature3D, id);
代码如上。 geoPlacemark.set_name("你好") 在场景显示 为乱码, 是这条属性无法显示中文?还是其他什么原因?