输入
//icon + 文字标签 兴趣点
__cy.poi.add({
pois:[{
id:"xxxx", //poi id
type: "xx", //poi的类型,poi分类
default_hidden:true, //默认是否隐藏
//展示距离区间值,[0,10000] 表示0到10000展示 地图距离单位(cm)
//[-1]表示永远显示,
show_distance:[0,10000],
no_block:true, //POI是否无遮挡显示
position_type: 0, //位置类型,0表示地图内的xyz坐标, 1表示经纬度,
position: [122, 22, 22], //[x, y, z] 地图距离单位(cm)or [经度, 纬度, 距地面高度],
icon: "http://xxxxx", //poi图标url
icon_size: [100,100], //poi图标展示大小[宽度,高度] 屏幕像素点单位
show_name: false , // 是否展示poi名字
name_no_block:true, //POI名字是否无遮挡显示
//自动展示poi名字的距离区间值,表示0到5000展示 地图距离单位(cm)
//[-1]表示永远显示
show_name_distance: [0,5000],
name: "xxxx", //poi 名字 多行时使用 | 进行换行, 如 AAA|BBB AAA和BBB会分成两行显示
name_font_size:5, //名字字体大小程度 数值范围:1~8
name_font_color:[255,255,255,255], //字体颜色,rgba 0~255
name_bg_color:[255,255,255,255], //字体背景颜色,rgba 0~255
detail:"http://xxxx", //详细信息网页url, 不传或者空则不显示详情
detail_size: [100,100], //详细信息网页展示大小[宽度,高度] 单位:屏幕像素点
detail_offset: [0, 0], // 详细信息位置offset 单位米
data:{}, //兴趣点携带的数据
bv_position:[], //最佳视觉位置
bv_rotator:[] //最佳视觉角度
}
]},callback)
// 自定义兴趣点 (html内容)
__cy.poi.addCustom({
pois:[{
id:"xxxx", //poi id
default_hidden:true, //默认是否隐藏
type: "xx", //poi的类型,
//展示距离区间值,[0,10000] 表示0到10000展示 地图距离单位(cm)
//[-1]表示永远显示,
show_distance:[0,10000],
position_type: 0, //位置类型,0表示地图内的xyz坐标, 1表示经纬度,
position: [122, 22, 22], //[x, y, z] 地图距离单位(cm) or [经度, 纬度, 距地面高度],
content:"http://content_url", //poi html内容url,
content_size:[100,100], //详细信息网页展示大小[宽度,高度] 单位:屏幕像素点
data:{}, //兴趣点携带的数据
bv_position:[], //最佳视觉位置
bv_rotator:[] //最佳视觉角度
}
]},callback)
//三维兴趣点 (需与美术制定)
__cy.poi.add3d({
pois:[{
id:"xxxx", //poi id
type: "xx", //poi的类型,用于分类管理
default_hidden:true, //默认是否隐藏
//展示距离区间值,[0,10000] 表示0到10000展示 地图距离单位(cm)
//[-1]表示永远显示,
show_distance:[0,10000],
no_block:true, //POI是否无遮挡显示
position_type: 0, //位置类型,0表示地图内的xyz坐标, 1表示经纬度,
position: [122, 22, 22], //[x, y, z] 地图距离单位(cm) or [经度, 纬度, 距地面高度],
show_type: "xxx", //三维兴趣点类型(需与美术制定)
show_name: false , // 是否展示poi名字
name_no_block:true, //POI名字是否无遮挡显示
//自动展示poi名字的距离区间值,表示0到5000展示 地图距离单位(cm)
//[-1]表示永远显示
show_name_distance: [0,5000],
name: "xxxx", //poi 名字 多行时使用 | 进行换行, 如 AAA|BBB AAA和BBB会分成两行显示
name_font_size:6, //名字字体大小程度 数值范围:1~8
name_font_color:[255,255,255,255], //字体颜色,rgba 0~255
name_bg_color:[255,255,255,255], //字体背景颜色,rgba 0~255
detail:"http://xxxx", //详细信息网页url, 不传或者空则不显示详情
detail_size: [100,100], //详细信息网页展示大小[宽度,高度] 单位:屏幕像素点
detail_offset: [0, 0], // 详细信息位置offset 单位米
data:{}, //兴趣点携带的数据
bv_position:[], //最佳视觉位置
bv_rotator:[], //最佳视觉角度
}
]},callback)
callback 回调输出
{
result:"" //输出结果 成功:"ok", 失败 返回具体原因
}
参考效果图
说明:
- 调用add需注意,数量一次不能超过200个点
- detail字段如果不传输,则兴趣点不会展示详细信息框