Skip to content

Commit 3648abf

Browse files
author
caoxinke
committed
将OpenLayers对接iServer mvt矢量瓦片的例子加到编辑页面中。
1 parent 640268f commit 3648abf

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

dist/iclient9-openlayers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6956,7 +6956,7 @@ ol.supermap.StyleUtils = {
69566956
toOLTextStyle: function (style, text) {
69576957
return new ol.style.Style({
69586958
text: new ol.style.Text({
6959-
font: style.fontStyle + ' ' + style.fontWeight + ' ' + style.fontSize + ' ' + style.fontFamily,
6959+
font: style.fontStyle || '' + ' ' + style.fontWeight || '' + ' ' + style.fontSize || '' + ' ' + style.fontFamily,
69606960
text: text,
69616961
textAlign: style.textAlign,
69626962
textBaseline: style.textBaseline,

examples/openlayers/config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,11 @@ var exampleConfig = {
402402
name: "MapBox矢量瓦片",
403403
thumbnail: "mapboxVectorLayer.png",
404404
fileName: "mapboxVectorLayer"
405+
},
406+
{
407+
name: "默认风格(MVT)",
408+
thumbnail: "mvtVectorLayer.png",
409+
fileName: "mvtVectorLayer"
405410
}
406411
]
407412
}
@@ -480,7 +485,7 @@ var sideBarIconConfig = {
480485
};
481486

482487
/**
483-
*key值:为exampleConfig配置的key值
488+
*key值:为exampleConfig配置的key值
484489
*value值:fontawesome字体icon名
485490
*与sideBarIconConfig的区别:sideBarIconConfig包括侧边栏所有层级目录的图标,exampleIconConfig仅包括一级标题的图标
486491
*/
29.8 KB
Loading
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<meta charset="UTF-8">
5-
<title>mvt矢量瓦片</title>
5+
<title>iServer MVT矢量瓦片</title>
66
<link href="http://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
77
<link href="http://cdn.bootcss.com/openlayers/4.0.1/ol.css" rel="stylesheet">
88
</head>

src/openlayers/core/StyleUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ ol.supermap.StyleUtils = {
302302
toOLTextStyle: function (style, text) {
303303
return new ol.style.Style({
304304
text: new ol.style.Text({
305-
font: style.fontStyle + ' ' + style.fontWeight + ' ' + style.fontSize + ' ' + style.fontFamily,
305+
font: style.fontStyle || '' + ' ' + style.fontWeight || '' + ' ' + style.fontSize || '' + ' ' + style.fontFamily,
306306
text: text,
307307
textAlign: style.textAlign,
308308
textBaseline: style.textBaseline,

0 commit comments

Comments
 (0)