矢量瓦片加载
new ol.supermap.MapService(url).getMapInfo(function(serviceResult) {
var stylesOptions = {
url: url,
view: newMap.getView()
};
var vectorTileStyles = new ol.supermap.VectorTileStyles(stylesOptions);
console.log(vectorTileStyles.getFeatureStyle);
var vectorTileOptions = ol.source.VectorTileSuperMapRest.optionsFromMapJSON(
url,
serviceResult.result
);
var vectorLayer = new ol.layer.VectorTile({
source: new ol.source.VectorTileSuperMapRest(vectorTileOptions),
style: vectorTileStyles.getFeatureStyle,
id: layerId,
className: className,
zIndex:zIndex
});
map.addLayer(vectorLayer);
});