Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
蔡永松
/
fontweb-dc
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
677a8d7c
authored
2020-08-07 18:25:18 +0800
by
weimo934
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改样式
1 parent
3239a349
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
0 deletions
src/main/webapp/view/PHJG/WFSJ/map/image/dzdt_normal.png
src/main/webapp/view/PHJG/WFSJ/map/image/yxdt_normal.png
src/main/webapp/view/PHJG/WFSJ/map/js/widget.js
src/main/webapp/view/PHJG/WFSJ/map/map.html
src/main/webapp/view/PHJG/WFSJ/map/image/dzdt_normal.png
0 → 100644
View file @
677a8d7
2.73 KB
src/main/webapp/view/PHJG/WFSJ/map/image/yxdt_normal.png
0 → 100644
View file @
677a8d7
5.48 KB
src/main/webapp/view/PHJG/WFSJ/map/js/widget.js
0 → 100644
View file @
677a8d7
/*var dojoConfig = {};
dojoConfig.baseUrl = "/frontweb/js/arcgis_js_api/dojo";*/
require
([
"esri/Map"
,
"esri/views/MapView"
,
"esri/Basemap"
,
"esri/layers/TileLayer"
,
"esri/geometry/Extent"
,
],
function
(
Map
,
MapView
,
Basemap
,
TileLayer
,
Extent
)
{
let
yingxiang_imageMap
=
new
TileLayer
({
url
:
'http://10.6.144.134:6080/arcgis/rest/services/影像底图2000/2018GF影像/MapServer'
// 影像地图
});
let
dianzi_imageMap
=
new
TileLayer
({
url
:
'http://10.7.120.44:6080/arcgis/rest/services/规划2000/电子地图/MapServer'
//电子底图
});
var
basemapIcon
=
{
yxdt
:
'image/dzdt_normal.png'
,
dzdt
:
'/image/yxdt_normal.png'
}
let
ext
=
new
Extent
({
"xmax"
:
628754.984749743
,
"ymax"
:
3820457.747395801
,
"xmin"
:
550649.8285394306
,
"ymin"
:
3773943.904368115
,
"spatialReference"
:
{
"wkid"
:
4545
}
});
let
electronBaseMap
=
new
Basemap
({
baseLayers
:
[
dianzi_imageMap
],
title
:
'electronicMap'
,
id
:
'electronicMap'
})
;
var
map
=
new
Map
({
basemap
:
electronBaseMap
});
var
view
=
new
MapView
({
container
:
"map"
,
map
:
map
,
extent
:
ext
,
zoom
:
1
});
$
(
function
()
{
$
(
'#trigger'
).
attr
(
'src'
,
basemapIcon
.
dzdt
);
$
(
'#trigger'
).
click
(
function
()
{
/* var basemaps = [];
for (var key in basemapIcon) {
var items = mapview.allLayerViews.items;
for (var i in items) {
var item = items[i];
if (item.layer && item.layer.id == key) {
basemaps.push(item);
break;
}
}
}
if (basemaps.length != 2) {
return false;
}
if (basemaps[0].layer.visible) {
basemaps[1].layer.visible = true;
basemaps[0].layer.visible = false;
this.setAttribute('src', basemapIcon.dzdt);
} else {
basemaps[0].layer.visible = true;
basemaps[1].layer.visible = false;
this.setAttribute('src', basemapIcon.yxdt);
}*/
})
});
});
\ No newline at end of file
src/main/webapp/view/PHJG/WFSJ/map/map.html
0 → 100644
View file @
677a8d7
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
简单地图
</title>
<script
src=
"../../../../js/jquery-1.8.3.js"
></script>
<script
src=
"../../../../common/js/config.js"
></script>
<script
src=
"../../../../js/arcgis_js_api/init.js"
></script>
<script
src=
"js/widget.js"
></script>
<style
type=
"text/css"
>
#map
{
width
:
100%
;
height
:
900px
;
border
:
#0a36e9
solid
1px
;
}
</style>
</head>
<body>
<div
style=
" position: absolute; right: 5px; top: 5px; z-index: 99;margin: 10px"
>
<img
id=
"trigger"
style=
" width: 50px; "
>
</div>
<div
id=
"map"
>
</div>
</body>
</html>
\ No newline at end of file
Please
register
or
sign in
to post a comment