Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
Map3D
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘恽伟
Map3D
Commits
d1a66340
Commit
d1a66340
authored
Feb 25, 2019
by
刘恽伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改调整倾斜摄影数据为白模数据
parent
4778be38
Pipeline
#11
canceled with stages
Changes
5
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
91 additions
and
51 deletions
+91
-51
config.json
test/Build/Static/config.json
+3
-0
EditorAxis.js
test/Build/Static/js/main/EditorAxis.js
+0
-0
core.js
test/Build/Static/js/main/core.js
+64
-43
ui.js
test/Build/Static/js/main/ui.js
+19
-7
index.html
test/index.html
+5
-1
No files found.
test/Build/Static/config.json
View file @
d1a66340
...
...
@@ -27,6 +27,9 @@
"index"
:
0
},
"MainModelData"
:
{
"model"
:
{
"url"
:
"http://172.16.10.132:3333/shaoguan/shaoguantestbaimo/tileset.json"
},
"vector"
:
{
"url"
:
"http://172.16.10.132:3333/shaoguan/shaoguanjianzhu/shaoguanjianzhu/tileset.json"
,
"matrix"
:
[
...
...
test/Build/Static/js/main/EditorAxis.js
0 → 100644
View file @
d1a66340
This diff is collapsed.
Click to expand it.
test/Build/Static/js/main/core.js
View file @
d1a66340
let
config
=
null
,
viewer
=
null
,
vector
=
null
,
piontCloud
=
null
,
east
=
null
,
west
=
null
,
model
=
null
,
ESRIImg
=
null
,
TDTVec
=
null
,
points
=
[],
polygon
=
null
,
polyline
=
null
,
handler
=
null
;
let
isAnalysisMeasure
=
false
,
isAnalysisRoam
=
false
,
isLinkageMap
=
false
,
isPopupAreaSign
=
false
;
ESRIImg
=
null
,
TDTVec
=
null
,
points
=
[],
polygon
=
null
,
polyline
=
null
,
handler
=
null
,
editorAxis
=
null
;
let
isAnalysisMeasure
=
false
,
isAnalysisRoam
=
false
,
isLinkageMap
=
false
,
isPopupAreaSign
=
false
;
/**
* 读取配置文件
*/
...
...
@@ -90,10 +90,19 @@ function initialize() {
requestWaterMask
:
false
,
requestVertexNormals
:
false
});
east
=
add3Dtile
(
config
.
MainModelData
.
east
.
url
,
config
.
MainModelData
.
east
.
matrix
);
west
=
add3Dtile
(
config
.
MainModelData
.
west
.
url
,
config
.
MainModelData
.
west
.
matrix
);
//
east = add3Dtile(config.MainModelData.east.url, config.MainModelData.east.matrix);
//
west = add3Dtile(config.MainModelData.west.url, config.MainModelData.west.matrix);
vector
=
add3Dtile
(
config
.
MainModelData
.
vector
.
url
,
config
.
MainModelData
.
vector
.
matrix
);
// piontCloud = add3Dtile(config.MainModelData.cloud.url, config.MainModelData.cloud.matrix);
model
=
viewer
.
scene
.
primitives
.
add
(
new
Cesium
.
Cesium3DTileset
({
url
:
config
.
MainModelData
.
model
.
url
,
maximumMemoryUsage
:
300
,
}));
model
.
readyPromise
.
then
(
function
()
{
editorAxis
=
new
EditorAxis
(
viewer
.
scene
,
{
model
:
model
,
})
});
for
(
let
i
=
0
;
i
<
15
;
i
+=
3
)
{
points
.
push
(
viewer
.
entities
.
add
({
name
:
"点"
+
(
i
/
3
+
1
),
...
...
@@ -111,39 +120,40 @@ function initialize() {
//二维面
var
entities
;
let
houseAreaSign
=
Cesium
.
GeoJsonDataSource
.
load
(
'Build/Data/houseAreaSign.json'
,
{
clampToGround
:
true
});
let
houseAreaSign
=
Cesium
.
GeoJsonDataSource
.
load
(
'Build/Data/houseAreaSign.json'
,
{
clampToGround
:
true
});
houseAreaSign
.
then
(
function
(
dataSource
)
{
entities
=
dataSource
.
entities
;
var
areaEntitiesVals
=
entities
.
values
;
for
(
let
i
=
0
;
i
<
areaEntitiesVals
.
length
;
i
++
)
{
var
entity
=
areaEntitiesVals
[
i
];
if
(
Cesium
.
defined
(
entity
.
polygon
))
{
entity
.
GID
=
Number
(
i
+
1
);
//加标识
entities
=
dataSource
.
entities
;
var
areaEntitiesVals
=
entities
.
values
;
for
(
let
i
=
0
;
i
<
areaEntitiesVals
.
length
;
i
++
)
{
var
entity
=
areaEntitiesVals
[
i
];
if
(
Cesium
.
defined
(
entity
.
polygon
))
{
entity
.
GID
=
Number
(
i
+
1
);
//加标识
}
}
viewer
.
dataSources
.
add
(
dataSource
);
polygon
=
entities
;
});
polygon
=
new
Cesium
.
GroundPrimitive
({
geometryInstances
:
new
Cesium
.
GeometryInstance
({
geometry
:
new
Cesium
.
CorridorGeometry
({
vertexFormat
:
Cesium
.
VertexFormat
.
POSITION_ONLY
,
positions
:
Cesium
.
Cartesian3
.
fromDegreesArrayHeights
(
bbb
),
width
:
20
}),
attributes
:
{
color
:
Cesium
.
ColorGeometryInstanceAttribute
.
fromColor
(
Cesium
.
Color
.
fromAlpha
(
Cesium
.
Color
.
YELLOW
,
0.8
))
}
}),
appearance
:
new
Cesium
.
PerInstanceColorAppearance
({
translucent
:
true
,
closed
:
true
,
aboveGround
:
true
}),
classificationType
:
Cesium
.
ClassificationType
.
BOTH
,
show
:
false
});
//
polygon = new Cesium.GroundPrimitive({
//
geometryInstances: new Cesium.GeometryInstance({
//
geometry: new Cesium.CorridorGeometry({
//
vertexFormat: Cesium.VertexFormat.POSITION_ONLY,
//
positions: Cesium.Cartesian3.fromDegreesArrayHeights(bbb),
//
width: 20
//
}),
//
attributes: {
//
color: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.fromAlpha(Cesium.Color.YELLOW, 0.8))
//
}
//
}),
//
appearance: new Cesium.PerInstanceColorAppearance({
//
translucent: true,
//
closed: true,
//
aboveGround: true
//
}),
//
classificationType: Cesium.ClassificationType.BOTH,
//
show: false
//
});
polyline
=
new
Cesium
.
GroundPrimitive
({
geometryInstances
:
new
Cesium
.
GeometryInstance
({
geometry
:
new
Cesium
.
CorridorGeometry
({
...
...
@@ -164,7 +174,7 @@ function initialize() {
show
:
false
});
viewer
.
scene
.
moon
.
show
=
false
;
viewer
.
scene
.
primitives
.
add
(
polygon
);
//
viewer.scene.primitives.add(polygon);
viewer
.
scene
.
primitives
.
add
(
polyline
);
viewer
.
scene
.
globe
.
depthTestAgainstTerrain
=
true
;
viewer
.
cesiumWidget
.
creditContainer
.
style
.
display
=
"none"
;
...
...
@@ -188,18 +198,18 @@ function initialize() {
let
pickedObject
=
viewer
.
scene
.
pick
(
movement
.
position
);
if
(
Cesium
.
defined
(
pickedObject
))
{
if
(
Cesium
.
defined
(
pickedObject
[
"id"
]))
{
if
(
isPopupAreaSign
)
{
var
url
=
"http://172.16.10.132:8012/geoserver/Map3D-V2.0/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=Map3D-V2.0:house_query&maxFeatures=50&outputFormat=application%2Fjson&viewparams=a:"
$
.
ajax
({
type
:
"GET"
,
url
:
url
+
pickedObject
[
"id"
].
GID
,
async
:
false
,
success
:
function
(
data
)
{
var
properties
=
data
.
features
[
0
].
properties
;
viewer
.
popup
.
show
(
cartesian
,
properties
);
}
});
}
if
(
isPopupAreaSign
)
{
var
url
=
"http://172.16.10.132:8012/geoserver/Map3D-V2.0/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=Map3D-V2.0:house_query&maxFeatures=50&outputFormat=application%2Fjson&viewparams=a:"
$
.
ajax
({
type
:
"GET"
,
url
:
url
+
pickedObject
[
"id"
].
GID
,
async
:
false
,
success
:
function
(
data
)
{
var
properties
=
data
.
features
[
0
].
properties
;
viewer
.
popup
.
show
(
cartesian
,
properties
);
}
});
}
}
}
},
Cesium
.
ScreenSpaceEventType
.
LEFT_DOWN
);
...
...
@@ -301,6 +311,17 @@ function endLinkageMap() {
}
function
editorShow
()
{
editorAxis
.
show
()
}
function
editorClose
()
{
editorAxis
.
close
()
}
function
editorReset
()
{
editorAxis
.
reset
()
}
function
cartesian2LonLat
(
cartesian
)
{
let
cartographic
=
Cesium
.
Cartographic
.
fromCartesian
(
cartesian
);
...
...
test/Build/Static/js/main/ui.js
View file @
d1a66340
...
...
@@ -23,8 +23,17 @@ $(document).ready(function () {
case
"bar_popup"
:
stopRoams
();
break
;
case
"bar_editorshow"
:
editorShow
();
break
;
case
"bar_editorclose"
:
editorClose
();
break
;
case
"bar_editorreset"
:
editorReset
();
break
;
}
if
(
id
===
"bar_layer"
||
id
===
"bar_popup"
)
{
if
(
id
===
"bar_layer"
||
id
===
"bar_popup"
)
{
if
(
$
(
this
).
hasClass
(
'active'
))
{
$
(
'.'
+
id
).
removeClass
(
'show'
);
$
(
this
).
removeClass
(
'active'
);
...
...
@@ -35,16 +44,19 @@ $(document).ready(function () {
switch
(
id
)
{
case
"bar_layer"
:
if
(
$
(
".show"
).
attr
(
"id"
)
!==
id
)
{
$
(
".show"
).
removeClass
(
"show"
);}
if
(
$
(
".show"
).
attr
(
"id"
)
!==
id
)
{
$
(
".show"
).
removeClass
(
"show"
);
}
if
(
$
(
'.active'
).
attr
(
"id"
)
!==
$
(
this
).
attr
(
"id"
))
{
$
(
".active"
).
removeClass
(
"active"
);
};
}
;
break
;
case
"bar_popup"
:
if
(
$
(
this
).
hasClass
(
'active'
))
{
isPopupAreaSign
=
true
;
isPopupAreaSign
=
true
;
}
else
{
isPopupAreaSign
=
false
;
isPopupAreaSign
=
false
;
}
break
;
}
...
...
@@ -157,13 +169,13 @@ $(document).ready(function () {
},
{
"id"
:
5
,
"text"
:
"矢量"
,
"text"
:
"矢量
面
"
,
"iconCls"
:
"icon-file"
,
"children"
:
[
{
"id"
:
51
,
"text"
:
"测试数据"
,
"checked"
:
fals
e
"checked"
:
tru
e
}
]
},
{
...
...
test/index.html
View file @
d1a66340
...
...
@@ -19,17 +19,21 @@
<script
src=
"Build/Static/js/main/Roam.js"
></script>
<script
src=
"Build/Static/js/main/Popup.js"
></script>
<script
src=
"Build/Static/js/main/Linkage.js"
></script>
<script
src=
"Build/Static/js/main/EditorAxis.js"
></script>
<body>
<div
id=
"mainScene"
class=
"fullSize mainScene"
>
<div
id=
"toolsbar"
class=
"toolsbar"
>
<div
class=
"tooldrop"
id=
"tool_layer"
><label>
图层控制
</label></div>
<div
class=
"tooldrop"
id=
"tool_popup"
><label>
气泡信息
</label></div>
<div
class=
"tooldrop"
id=
"tool_start"
><label>
开始飞行
</label></div>
<div
class=
"tooldrop"
id=
"tool_end"
><label>
停止飞行
</label></div>
<div
class=
"tooldrop"
id=
"tool_polyline"
><label>
线测量
</label></div>
<div
class=
"tooldrop"
id=
"tool_polygon"
><label>
面测量
</label></div>
<div
class=
"tooldrop"
id=
"tool_clean"
><label>
清除
</label></div>
<div
class=
"tooldrop"
id=
"tool_popup"
><label>
气泡信息
</label></div>
<div
class=
"tooldrop"
id=
"tool_editorshow"
><label>
编辑
</label></div>
<div
class=
"tooldrop"
id=
"tool_editorclose"
><label>
关闭
</label></div>
<div
class=
"tooldrop"
id=
"tool_editorreset"
><label>
还原
</label></div>
</div>
<div
id=
"bar_layer"
class=
"bar_layer"
>
<div
id=
"tree"
class=
"tree"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment