Skip to content

Commit 4d1e265

Browse files
fix ut
1 parent 964ee87 commit 4d1e265

21 files changed

+76
-102
lines changed

examples/leaflet/01_mapQueryBySQL_FGB.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
.queryBySQL(param, function (serviceResult) {
3838
new L.supermap.FGBLayer(serviceResult.result.newResourceLocation, {
3939
strategy: 'all'
40-
});
41-
})};
40+
}).addTo(map);
41+
}, 'FGB')};
4242
</script>
4343
</body>
4444
</html>

examples/leaflet/02_getFeatureBySQL_FGB.html

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,47 +16,29 @@
1616
var map,
1717
resultLayer,
1818
baseUrl = host + '/iserver/services/map-china400/rest/maps/China',
19-
url = 'http://localhost:8090/iserver/services/data-China100/rest/data';
19+
url = host + "/iserver/services/data-world/rest/data";
2020
map = L.map('map', {
2121
preferCanvas: true,
2222
crs: L.CRS.EPSG3857,
2323
center: { lon: 113, lat: 39 },
2424
maxZoom: 18,
25-
zoom: 7
25+
zoom: 1
2626
});
2727
new L.supermap.TiledMapLayer(baseUrl).addTo(map);
2828
query();
2929
function query() {
3030
var sqlParam = new L.supermap.GetFeaturesBySQLParameters({
3131
queryParameter: {
32-
name: 'China_Rural_pt@China',
33-
attributeFilter: 'SMID < 50000'
32+
name: "Countries@World",
33+
attributeFilter: "SMID = 234"
3434
},
35-
maxFeatures: 50000,
36-
returnContent: false,
37-
datasetNames: ['China:China_Rural_pt']
35+
datasetNames: ["World:Countries"]
3836
});
3937
new L.supermap.FeatureService(url).getFeaturesBySQL(
4038
sqlParam,
4139
function (serviceResult) {
4240
new L.supermap.FGBLayer(serviceResult.result.newResourceLocation, {
43-
style: {
44-
color: 'blue',
45-
weight: 5,
46-
fillOpacity: 0.8
47-
},
48-
featureLoader: function(feature) {
49-
feature.geometry.coordinates = Proj4js('EPSG:3857', 'EPSG:4326', feature.geometry.coordinates)
50-
return feature;
51-
},
52-
pointToLayer: function (feature, latlng) {
53-
return L.circleMarker(latlng, {
54-
radius: 2,
55-
fillColor: '#ff0000',
56-
weight: 1,
57-
opacity: 1
58-
});
59-
}
41+
strategy: 'all'
6042
}).addTo(map);
6143
},
6244
'FGB'

examples/leaflet/04_bufferAnalystService_geometry_FGB.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@
8585

8686
bufferAnalystService.bufferAnalysis(geoBufferAnalystParams, function (serviceResult) {
8787
var resultLayer = new L.supermap.FGBLayer(serviceResult.result.newResourceLocation, {
88-
style: {
89-
color: 'red'
90-
},
9188
strategy: 'all'
9289
}).addTo(map);
9390
}, 'FGB');

examples/leaflet/04_overlayAnalystService_FGB.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@
3636

3737
overlayAnalystService.overlayAnalysis(datasetOverlayAnalystParameters, function (serviceResult) {
3838
new L.supermap.FGBLayer(serviceResult.result.newResourceLocation, {
39-
style: {
40-
color: 'blue'
41-
},
4239
strategy: 'all'
4340
}).addTo(map);
4441
}, 'FGB');

examples/leaflet/04_thiessenAnalystService_datasets_FGB.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@
3737

3838
thiessenAnalystService.thiessenAnalysis(dsThiessenAnalystParameters, function (serviceResult) {
3939
new L.supermap.FGBLayer(serviceResult.result.newResourceLocation, {
40-
style: {
41-
color: 'blue',
42-
weight: 2
43-
},
4440
strategy: 'all'
4541
}).addTo(map);
4642
}, 'FGB');

examples/leaflet/04_thiessenAnalystService_geometry_FGB.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@
5050
thiessenAnalystService = new L.supermap.SpatialAnalystService(serviceUrl);
5151
thiessenAnalystService.thiessenAnalysis(gThiessenAnalystParameters, function (serviceResult) {
5252
new L.supermap.FGBLayer(serviceResult.result.newResourceLocation, {
53-
style: {
54-
color: 'blue',
55-
weight: 2
56-
},
5753
strategy: 'all'
5854
}).addTo(map);
5955
}, 'FGB')

examples/leaflet/fgb_all_load.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
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: 50%; height: 100%; position: absolute; top: 0; left: 0">
12+
<div id="fgb-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 = 20000;
16+
var allowMaxFeatures = 100000;
1717
var host = window.isLocal ? window.server : 'https://iserver.supermap.io';
1818
var map,
1919
FGBMap,
@@ -23,9 +23,9 @@
2323
FGBMap = L.map('fgb-map', {
2424
preferCanvas: true,
2525
crs: L.CRS.EPSG4326,
26-
center: { lon: 113, lat: 39 },
26+
center: { lon: 107, lat: 37 },
2727
maxZoom: 18,
28-
zoom: 3
28+
zoom: 4
2929
});
3030
new L.supermap.TiledMapLayer(baseUrl).addTo(FGBMap);
3131
var sqlParam = new L.supermap.GetFeaturesBySQLParameters({

examples/leaflet/fgb_extent_load.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
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: 50%; height: 100%; position: absolute; top: 0; left: 0">
12+
<div id="fgb-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">

examples/mapboxgl/fgb_all_load.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</style>
2525
</head>
2626
<body>
27-
<div id="map-fgb">
27+
<div id="map">
2828
</div>
2929
<script>
3030
var attribution =
@@ -55,18 +55,18 @@
5555
}
5656
]
5757
},
58-
center: [106.143, 40.236],
58+
center: [107, 37],
5959
zoom: 8
6060
};
6161

62-
var mapfgb = new mapboxgl.Map({
63-
container: 'map-fgb',
62+
var map = new mapboxgl.Map({
63+
container: 'map',
6464
...mapConfig
6565
});
66-
mapfgb.addControl(new mapboxgl.NavigationControl(), 'top-left');
67-
mapfgb.addControl(new mapboxgl.supermap.LogoControl(), 'bottom-right');
66+
map.addControl(new mapboxgl.NavigationControl(), 'top-left');
67+
map.addControl(new mapboxgl.supermap.LogoControl(), 'bottom-right');
6868

69-
mapfgb.on('load', function () {
69+
map.on('load', function () {
7070
queryFgb();
7171
});
7272

@@ -87,7 +87,7 @@
8787
url: serviceResult.result.newResourceLocation,
8888
strategy: 'all'
8989
});
90-
mapfgb.addLayer(FGBLayer);
90+
map.addLayer(FGBLayer);
9191
},
9292
'FGB'
9393
);

examples/mapboxgl/fgb_extent_load.html

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
</style>
2525
</head>
2626
<body>
27-
<div id="map-fgb">
28-
<p style="font-size: 30px; width: 300px; height: 100px; position: absolute; left: 50%; z-index: 10000;">fgb 加载</p></div>
27+
<div id="map">
2928
</div>
3029
<script>
3130
var attribution =
@@ -35,7 +34,7 @@
3534
var host = window.isLocal ? window.server : 'https://iserver.supermap.io';
3635
var baseUrl = host + '/iserver/services/map-china400/rest/maps/China/zxyTileImage.png?z={z}&x={x}&y={y}';
3736
var dataUrl = 'http://localhost:8090/iserver/services/data-osm-line/rest/data';
38-
var allowMaxFeatures = 5000;
37+
var allowMaxFeatures = 20000;
3938
var mapConfig = {
4039
style: {
4140
version: 8,
@@ -60,14 +59,14 @@
6059
zoom: 3
6160
};
6261

63-
var mapfgb = new mapboxgl.Map({
64-
container: 'map-fgb',
62+
var map = new mapboxgl.Map({
63+
container: 'map',
6564
...mapConfig
6665
});
67-
mapfgb.addControl(new mapboxgl.NavigationControl(), 'top-left');
68-
mapfgb.addControl(new mapboxgl.supermap.LogoControl(), 'bottom-right');
66+
map.addControl(new mapboxgl.NavigationControl(), 'top-left');
67+
map.addControl(new mapboxgl.supermap.LogoControl(), 'bottom-right');
6968

70-
mapfgb.on('load', function () {
69+
map.on('load', function () {
7170
queryFgb();
7271
});
7372

@@ -87,7 +86,7 @@
8786
const FGBLayer = new mapboxgl.supermap.FGBLayer({
8887
url: serviceResult.result.newResourceLocation
8988
});
90-
mapfgb.addLayer(FGBLayer);
89+
map.addLayer(FGBLayer);
9190
},
9291
'FGB'
9392
);

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