您好,
不用fountainParticle.set_particleFilePath了。
您改为:
fountainParticle.set_particleType(SuperMap.Web.Core.ParticleType.Fire)试试。
示例:
function TextParticleSystem()
{
构造 geoPoint3D 对象,火焰/烟雾/烟火/喷泉/爆炸/尾焰粒子关联的 Geometry 必须为 GeoPoint3D 类型的对象
var geoPoint3D = new SuperMap.Web.Core.GeoPoint3D(new SuperMap.Web.Core.Point3D(116.38817, 39.99263, 30));
构造粒子几何对象并关联 Gemotry 对象为 geoPoint3D
var geoParticle = new SuperMap.Web.Core.GeoParticle();
if (geoParticle.makeWithGeometry(geoPoint3D) == false)
{
return;
}
设置粒子效果类型,可参见 ParticleType 枚举
geoParticle.set_particleType(SuperMap.Web.Core.ParticleType.Fire);
获取 geoParticle 对象所持有的 rainPariticleSystem
var particleSystem = geoParticle.getParticleSystemByIndex(0);
if (particleSystem == null)
{
return;
}
设置粒子系统对象的各项参数
particleSystem.set_particleWidth(500);
particleSystem.set_particleHeight(700);
particleSystem.set_particleCountPerSecond(13000);
构造 Feature3D 对象,设置几何对象为 geoParticle
var feature3D = new SuperMap.Web.Core.Feature3D();
feature3D.set_geometry(geoParticle);
获取跟踪图层并在跟踪图层添加 feature3D 对象
trackingLayer.add(feature3D, "particle");
}