Skip to content

Commit ccd8fe0

Browse files
fix fgb ut
1 parent 4d1e265 commit ccd8fe0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+139
-130
lines changed

examples/leaflet/02_getFeatureBySQL_FGB.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
var host = window.isLocal ? window.server : 'https://iserver.supermap.io';
1616
var map,
1717
resultLayer,
18-
baseUrl = host + '/iserver/services/map-china400/rest/maps/China',
18+
baseUrl = host + '/iserver/services/map-world/rest/maps/World',
1919
url = host + "/iserver/services/data-world/rest/data";
2020
map = L.map('map', {
2121
preferCanvas: true,
22-
crs: L.CRS.EPSG3857,
23-
center: { lon: 113, lat: 39 },
22+
crs: L.CRS.EPSG4326,
23+
center: { lon: 0, lat: 0 },
2424
maxZoom: 18,
2525
zoom: 1
2626
});

examples/leaflet/04_bufferAnalystService_geometry_FGB.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,21 @@
8888
strategy: 'all'
8989
}).addTo(map);
9090
}, 'FGB');
91+
92+
bufferAnalystService.bufferAnalysis(geoBufferAnalystParams, function (serviceResult) {
93+
resultLayer = L.geoJSON(serviceResult.result.resultGeometry);
94+
//查询出缓冲区内信号影响范围内的工厂
95+
queryService = new L.supermap.QueryService(baseUrl);
96+
queryByGeometryParameters = new L.supermap.QueryByGeometryParameters({
97+
queryParams: [new L.supermap.FilterParameter({name: "Company@Changchun.2"})],
98+
geometry: resultLayer,
99+
spatialQueryMode: L.supermap.SpatialQueryMode.INTERSECT
100+
});
101+
queryService.queryByGeometry(queryByGeometryParameters, function (serviceResult) {
102+
var result = serviceResult.result;
103+
resultLayer1 = L.geoJSON(result.recordsets[0].features).addTo(map);
104+
});
105+
});
91106
}
92107
</script>
93108
</body>

examples/leaflet/config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,18 +1091,18 @@ var exampleConfig = {
10911091
version: '11.1.0',
10921092
content: [
10931093
{
1094-
name: 'FGB 完整加载',
1094+
name: 'FGB 全量加载',
10951095
name_en: 'FGB Full Load',
10961096
version: '11.1.0',
1097-
thumbnail: 'l_pixiOverlay_taxi.png',
1097+
thumbnail: 'fgb_all_load.png',
10981098
fileName: 'fgb_all_load'
10991099
},
11001100
{
1101-
name: 'FGB 局部加载',
1101+
name: 'FGB 按需加载',
11021102
name_en: 'FGB Extent Load',
11031103
version: '11.1.0',
1104-
thumbnail: 'l_pixiOverlay_taxi.png',
1105-
fileName: 'fgb_all_load'
1104+
thumbnail: 'fgb_bbox_load.png',
1105+
fileName: 'fgb_bbox_load'
11061106
}
11071107
]
11081108
}

examples/leaflet/fgb_all_load.html

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@
99
<script type="text/javascript" src="../js/include-web.js"></script>
1010
</head>
1111
<body style="margin: 0; overflow: hidden; background: #fff; width: 100%; height: 100%; position: absolute; top: 0">
12-
<div id="fgb-map" style="margin: 0 auto; width: 100%; height: 100%; position: absolute; top: 0; left: 0">
12+
<div id="map" style="margin: 0 auto; width: 100%; height: 100%; position: absolute; top: 0; left: 0">
1313
</div>
1414
<script type="text/javascript" src="../../dist/leaflet/include-leaflet.js"></script>
1515
<script type="text/javascript">
16-
var allowMaxFeatures = 100000;
16+
var allowMaxFeatures = 120000;
1717
var host = window.isLocal ? window.server : 'https://iserver.supermap.io';
1818
var map,
1919
FGBMap,
2020
resultLayer,
2121
baseUrl = host + '/iserver/services/map-china400/rest/maps/China_4326',
2222
url = 'http://localhost:8090/iserver/services/data-osm-line/rest/data';
23-
FGBMap = L.map('fgb-map', {
23+
FGBMap = L.map('map', {
2424
preferCanvas: true,
2525
crs: L.CRS.EPSG4326,
26-
center: { lon: 107, lat: 37 },
26+
center: { lon: 110, lat: 30 },
2727
maxZoom: 18,
28-
zoom: 4
28+
zoom: 3
2929
});
3030
new L.supermap.TiledMapLayer(baseUrl).addTo(FGBMap);
3131
var sqlParam = new L.supermap.GetFeaturesBySQLParameters({
@@ -44,10 +44,6 @@
4444
sqlParam,
4545
function (serviceResult) {
4646
new L.supermap.FGBLayer(serviceResult.result.newResourceLocation, {
47-
style: {
48-
color: 'blue',
49-
weight: 5
50-
},
5147
strategy: 'all'
5248
}).addTo(FGBMap);
5349
},

examples/leaflet/fgb_extent_load.html renamed to examples/leaflet/fgb_bbox_load.html

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,24 @@
99
<script type="text/javascript" src="../js/include-web.js"></script>
1010
</head>
1111
<body style="margin: 0; overflow: hidden; background: #fff; width: 100%; height: 100%; position: absolute; top: 0">
12-
<div id="fgb-map" style="margin: 0 auto; width: 100%; height: 100%; position: absolute; top: 0; left: 0">
12+
<div id="map" style="margin: 0 auto; width: 100%; height: 100%; position: absolute; top: 0; left: 0">
1313
</div>
1414
<script type="text/javascript" include="FGB" src="../../dist/leaflet/include-leaflet.js"></script>
1515
<script type="text/javascript">
16-
var allowMaxFeatures = 20000;
16+
var allowMaxFeatures = 120000;
1717
var host = window.isLocal ? window.server : 'https://iserver.supermap.io';
1818
var map,
19-
FGBMap,
2019
resultLayer,
2120
baseUrl = host + '/iserver/services/map-china400/rest/maps/China_4326',
2221
url = 'http://localhost:8090/iserver/services/data-osm-line/rest/data';
23-
FGBMap = L.map('fgb-map', {
22+
map = L.map('map', {
2423
preferCanvas: true,
2524
crs: L.CRS.EPSG4326,
26-
center: { lon: 113, lat: 39 },
25+
center: [40.05, 116.3],
2726
maxZoom: 18,
28-
zoom: 3
27+
zoom: 8
2928
});
30-
new L.supermap.TiledMapLayer(baseUrl).addTo(FGBMap);
29+
new L.supermap.TiledMapLayer(baseUrl).addTo(map);
3130
var sqlParam = new L.supermap.GetFeaturesBySQLParameters({
3231
queryParameter: {
3332
name: 'waterways@osm-line',
@@ -38,18 +37,14 @@
3837
datasetNames: ['osm-line:waterways']
3938
});
4039
fgbQuery();
41-
40+
window.map = map;
4241
function fgbQuery() {
4342
new L.supermap.FeatureService(url).getFeaturesBySQL(
4443
sqlParam,
4544
function (serviceResult) {
4645
new L.supermap.FGBLayer(serviceResult.result.newResourceLocation, {
47-
style: {
48-
color: 'blue',
49-
weight: 5
50-
},
5146
strategy: 'bbox'
52-
}).addTo(FGBMap);
47+
}).addTo(map);
5348
},
5449
'FGB'
5550
);

examples/leaflet/img/fgb_all_load.png

32.4 KB
Loading
68.6 KB
Loading

examples/locales/zh-CN/resources.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,8 +657,8 @@ window.examplesResources = {
657657
"title_binary_classification": "二元分类",
658658
"title_landcover_classification": "地物分类",
659659
"title_object_detection": "目标检测",
660-
"title_fgb_all": "FGB 完整加载",
661-
"title_fgb_extent": "FGB 局部加载",
660+
"title_fgb_all": "FGB 全量加载",
661+
"title_fgb_extent": "FGB 按需加载",
662662

663663
"text_district_search": "行政区检索",
664664
"text_rectangle_search": "矩形检索",

examples/mapboxgl/config.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,18 @@ var exampleConfig = {
6464
thumbnail: 'mb_mapQueryByGeometry.png',
6565
fileName: '01_mapQueryByGeometry'
6666
},
67-
{
68-
name: '几何查询 (FGB)',
69-
name_en: 'geometry query (FGB)',
70-
version: '11.1.0',
71-
thumbnail: 'mb_mapQueryBySQL.png',
72-
fileName: '01_mapQueryBySQL'
73-
},
7467
{
7568
name: 'SQL查询',
7669
name_en: 'SQL query',
7770
thumbnail: 'mb_mapQueryBySQL.png',
7871
fileName: '01_mapQueryBySQL'
72+
},
73+
{
74+
name: 'SQL查询 (FGB)',
75+
name_en: 'SQL query (FGB)',
76+
version: '11.1.0',
77+
thumbnail: 'mb_mapQueryBySQL.png',
78+
fileName: '01_mapQueryBySQL_FGB'
7979
}
8080
]
8181
},
@@ -1103,18 +1103,18 @@ var exampleConfig = {
11031103
version: '11.0.1',
11041104
content: [
11051105
{
1106-
name: 'FGB 完整加载',
1106+
name: 'FGB 全量加载',
11071107
name_en: 'FGB Full Load',
11081108
version: '11.1.0',
1109-
thumbnail: 'l_pixiOverlay_taxi.png',
1109+
thumbnail: 'fgb_all_load.png',
11101110
fileName: 'fgb_all_load'
11111111
},
11121112
{
1113-
name: 'FGB 局部加载',
1113+
name: 'FGB 按需加载',
11141114
name_en: 'FGB Extent Load',
11151115
version: '11.1.0',
1116-
thumbnail: 'l_pixiOverlay_taxi.png',
1117-
fileName: 'fgb_all_load'
1116+
thumbnail: 'fgb_bbox_load.png',
1117+
fileName: 'fgb_bbox_load'
11181118
}
11191119
]
11201120
}

examples/mapboxgl/fgb_all_load.html

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
padding: 0;
1616
}
1717

18-
#map-fgb {
18+
#map {
1919
position: absolute;
2020
top: 0;
2121
bottom: 0;
@@ -34,8 +34,10 @@
3434
var host = window.isLocal ? window.server : 'https://iserver.supermap.io';
3535
var baseUrl = host + '/iserver/services/map-china400/rest/maps/China/zxyTileImage.png?z={z}&x={x}&y={y}';
3636
var dataUrl = 'http://localhost:8090/iserver/services/data-osm-line/rest/data';
37-
var allowMaxFeatures = 20000;
38-
var mapConfig = {
37+
var allowMaxFeatures = 120000;
38+
39+
var map = new mapboxgl.Map({
40+
container: 'map',
3941
style: {
4042
version: 8,
4143
sources: {
@@ -55,13 +57,8 @@
5557
}
5658
]
5759
},
58-
center: [107, 37],
59-
zoom: 8
60-
};
61-
62-
var map = new mapboxgl.Map({
63-
container: 'map',
64-
...mapConfig
60+
center: [110, 30],
61+
zoom: 3
6562
});
6663
map.addControl(new mapboxgl.NavigationControl(), 'top-left');
6764
map.addControl(new mapboxgl.supermap.LogoControl(), 'bottom-right');

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy