Skip to content

Commit 5c47f58

Browse files
committed
【fix】include中增加opencv flv
1 parent 809dd90 commit 5c47f58

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

dist/mapboxgl/include-mapboxgl.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,13 @@
185185
inputCSS(libsurl + '/video-js/7.10.2/video-js.min.css');
186186
inputScript(libsurl + '/video-js/7.10.2/video.min.js');
187187
}
188+
if (inArray(includes, 'flvjs')) {
189+
inputScript(libsurl + '/flvjs/1.6.2/flv.js');
190+
inputScript(libsurl + '/videojs-flvjs-es6/1.0.1/videojs-flvjs-es6.js');
191+
}
192+
if (inArray(includes, 'opencv')) {
193+
inputScript(libsurl + '/opencv/3.4/opencv.js');
194+
}
188195
// dist
189196
if (!inArray(excludes, 'iclient-mapboxgl')) {
190197
if (supportES6()) {

examples/mapboxgl/videoLayer.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<script type="text/javascript" include="bootstrap" src="../js/include-web.js"></script>
2626
<script
2727
type="text/javascript"
28-
include="mapbox-gl-enhance,proj4,turf,opencv"
28+
include="mapbox-gl-enhance,proj4,turf,videojs,opencv"
2929
src="../../dist/mapboxgl/include-mapboxgl.js"
3030
></script>
3131
<script type="text/javascript">
@@ -47,10 +47,11 @@
4747
version: 8,
4848
sources: {
4949
'raster-tiles': {
50-
attribution: attribution,
5150
type: 'raster',
52-
tiles: [url + '/zxyTileImage.png?z={z}&x={x}&y={y}'],
53-
tileSize: 256
51+
tileSize: 256,
52+
tiles: [
53+
'https://t4.tianditu.gov.cn/img_w/wmts?service=WMTS&request=GetTile&version=1.0.0&style=default&tilematrixSet=w&format=tiles&width=256&height=256&layer=img&tilematrix={z}&tilerow={y}&tilecol={x}&tk=1d109683f4d84198e37a38c442d68311'
54+
]
5455
}
5556
},
5657
layers: [
@@ -59,7 +60,7 @@
5960
type: 'raster',
6061
source: 'raster-tiles',
6162
minzoom: 0,
62-
maxzoom: 9
63+
maxzoom: 22
6364
}
6465
]
6566
},
@@ -71,20 +72,21 @@
7172
function query() {
7273
var sqlParam = new mapboxgl.supermap.GetFeaturesBySQLParameters({
7374
queryParameter: {
74-
name: datasetName + '@' + datasourceName,
75+
name: datasetName + '@' + datasourceName,
7576
attributeFilter: 'SMID > 0'
7677
},
7778
datasetNames: [datasourceName + ':' + datasetName]
7879
});
7980

80-
new mapboxgl.supermap.FeatureService(dataUrl).getFeaturesBySQL(boundsParam).then(function (serviceResult) {
81+
new mapboxgl.supermap.FeatureService(dataUrl).getFeaturesBySQL(sqlParam).then(function (serviceResult) {
8182
let coordinates = [];
8283
turf.featureEach(serviceResult.result.features, function (currentFeature, featureIndex) {
8384
currentFeature.geometry.coordinates[0][0].forEach((coord) => {
8485
const res = proj4('EPSG:3857', 'EPSG:4326', coord);
8586
coordinates.push(res);
8687
});
8788
});
89+
map.setCenter(coordinates[0]);
8890
let address = serviceResult.result.features.features[0].properties.address;
8991
videoLayer = new mapboxgl.supermap.VideoLayer({
9092
url: address,

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