Update vectortiles
This commit is contained in:
@@ -245,7 +245,7 @@ function styleFunction(feature, resolution) {
|
||||
stroke.setColor(constants['@street_casing']);
|
||||
stroke.setWidth(base(constants['@street_casing_width']));
|
||||
styles[length++] = line;
|
||||
} else if (layer == 'tunnel' && cls == 'main') {
|
||||
} else if (layer == 'tunnel' && cls == 'main' && zoom >= 7) {
|
||||
stroke.setColor(constants['@motorway_casing']);
|
||||
stroke.setWidth(base(constants['@main_casing_width']));
|
||||
styles[length++] = line;
|
||||
@@ -270,7 +270,7 @@ function styleFunction(feature, resolution) {
|
||||
stroke.setColor(constants['@street_casing']);
|
||||
stroke.setWidth(base(constants['@street_casing_width']));
|
||||
styles[length++] = line;
|
||||
} else if (layer == 'road' && cls == 'main') {
|
||||
} else if (layer == 'road' && cls == 'main' && zoom >= 7) {
|
||||
stroke.setColor(constants['@motorway_casing']);
|
||||
stroke.setWidth(base(constants['@main_casing_width']));
|
||||
styles[length++] = line;
|
||||
@@ -303,7 +303,7 @@ function styleFunction(feature, resolution) {
|
||||
stroke.setColor(constants['@street_casing']);
|
||||
stroke.setWidth(base(constants['@street_casing_width']));
|
||||
styles[length++] = line;
|
||||
} else if (layer == 'bridge' && cls == 'main') {
|
||||
} else if (layer == 'bridge' && cls == 'main' && zoom >= 7) {
|
||||
stroke.setColor(constants['@motorway_casing']);
|
||||
stroke.setWidth(base(constants['@main_casing_width']));
|
||||
styles[length++] = line;
|
||||
@@ -432,7 +432,9 @@ map = new ol.Map({
|
||||
new ol.layer.VectorTile({
|
||||
source: new ol.source.VectorTile({
|
||||
rightHandedPolygons: true,
|
||||
format: new ol.format.MVT(),
|
||||
format: new ol.format.MVT({
|
||||
flyweight: true
|
||||
}),
|
||||
tileGrid: ol.tilegrid.createXYZ({maxZoom: 22}),
|
||||
tilePixelRatio: 16,
|
||||
tileUrlFunction: function(tileCoord) {
|
||||
@@ -466,7 +468,7 @@ map = new ol.Map({
|
||||
</div>
|
||||
</textarea>
|
||||
<input type="hidden" name="wrap" value="l">
|
||||
<input type="hidden" name="resources" value="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css,https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js,http://openlayers.org/en/v3.8.2/css/ol.css,http://openlayers.org/en/v3.8.2/build/ol.js">
|
||||
<input type="hidden" name="resources" value="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css,https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js,http://openlayers.org/en/v3.9.0/css/ol.css,http://openlayers.org/en/v3.9.0/build/ol.js">
|
||||
</form>
|
||||
<pre><code id="example-source" class="language-markup"><!DOCTYPE html>
|
||||
<html>
|
||||
@@ -475,8 +477,8 @@ map = new ol.Map({
|
||||
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" href="http://openlayers.org/en/v3.8.2/css/ol.css" type="text/css">
|
||||
<script src="http://openlayers.org/en/v3.8.2/build/ol.js"></script>
|
||||
<link rel="stylesheet" href="http://openlayers.org/en/v3.9.0/css/ol.css" type="text/css">
|
||||
<script src="http://openlayers.org/en/v3.9.0/build/ol.js"></script>
|
||||
|
||||
<style>
|
||||
.map {
|
||||
@@ -693,7 +695,7 @@ function styleFunction(feature, resolution) {
|
||||
stroke.setColor(constants['@street_casing']);
|
||||
stroke.setWidth(base(constants['@street_casing_width']));
|
||||
styles[length++] = line;
|
||||
} else if (layer == 'tunnel' && cls == 'main') {
|
||||
} else if (layer == 'tunnel' && cls == 'main' && zoom >= 7) {
|
||||
stroke.setColor(constants['@motorway_casing']);
|
||||
stroke.setWidth(base(constants['@main_casing_width']));
|
||||
styles[length++] = line;
|
||||
@@ -718,7 +720,7 @@ function styleFunction(feature, resolution) {
|
||||
stroke.setColor(constants['@street_casing']);
|
||||
stroke.setWidth(base(constants['@street_casing_width']));
|
||||
styles[length++] = line;
|
||||
} else if (layer == 'road' && cls == 'main') {
|
||||
} else if (layer == 'road' && cls == 'main' && zoom >= 7) {
|
||||
stroke.setColor(constants['@motorway_casing']);
|
||||
stroke.setWidth(base(constants['@main_casing_width']));
|
||||
styles[length++] = line;
|
||||
@@ -751,7 +753,7 @@ function styleFunction(feature, resolution) {
|
||||
stroke.setColor(constants['@street_casing']);
|
||||
stroke.setWidth(base(constants['@street_casing_width']));
|
||||
styles[length++] = line;
|
||||
} else if (layer == 'bridge' && cls == 'main') {
|
||||
} else if (layer == 'bridge' && cls == 'main' && zoom >= 7) {
|
||||
stroke.setColor(constants['@motorway_casing']);
|
||||
stroke.setWidth(base(constants['@main_casing_width']));
|
||||
styles[length++] = line;
|
||||
@@ -880,7 +882,9 @@ map = new ol.Map({
|
||||
new ol.layer.VectorTile({
|
||||
source: new ol.source.VectorTile({
|
||||
rightHandedPolygons: true,
|
||||
format: new ol.format.MVT(),
|
||||
format: new ol.format.MVT({
|
||||
flyweight: true
|
||||
}),
|
||||
tileGrid: ol.tilegrid.createXYZ({maxZoom: 22}),
|
||||
tilePixelRatio: 16,
|
||||
tileUrlFunction: function(tileCoord) {
|
||||
|
||||
Reference in New Issue
Block a user