Replies: 16 comments
-
@szygiser I do not understand the question. Please provide more details |
Beta Was this translation helpful? Give feedback.
-
I used mpboxgl to load the vector tiles of the line layer generated by Martin. When I reduced the map scale, the line layer became blurred。 |
Beta Was this translation helpful? Give feedback.
-
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Add a third party vector tile source</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<link href="https://api.mapbox.com/mapbox-gl-js/v2.14.1/mapbox-gl.css" rel="stylesheet">
<script src="https://api.mapbox.com/mapbox-gl-js/v2.14.1/mapbox-gl.js"></script>
<style>
body {
margin: 0;
padding: 0;
}
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
// TO MAKE THE MAP APPEAR YOU MUST
// ADD YOUR ACCESS TOKEN FROM
// https://account.mapbox.com
mapboxgl.accessToken = 'pk.eyJ1Ijoic29uZ3plbmd5dSIsImEiOiJjbGo0ZDM0bmMwMTBzM2RreGlqMXNsc2YwIn0.ik-fY3Yx7mRu02ySZnjavQ';
const map = new mapboxgl.Map({
container: 'map',
// Choose from Mapbox's core styles, or make your own style with Mapbox Studio
style: 'mapbox://styles/mapbox/light-v11',
zoom: 10,
center: [117.110805, 36.663046],
projection: 'mercator',
antialiased: true,
hash: true,
minTileCacheSize: 512,
collectResourceTiming: true,
cooperativeGestures: false,
crossSourceCollisions: true,
refreshExpiredTiles: true,
trackResize: false
});
map.on('load', () => {
addMvt();
}
);
map.addControl(new mapboxgl.NavigationControl());
function addMvt() {
map.addLayer({
id: 'lines',
type: 'line',
source: {
type: 'vector',
url: 'http://localhost:3000/ghgas_pipesectionhpa'
},
'source-layer': 'ghgas_pipesectionhpa',
paint: {
'line-opacity': 1,
'line-color': 'rgb(53, 175, 109)',
'line-width': 2
}
});
}
</script>
</body>
</html> |
Beta Was this translation helpful? Give feedback.
-
I don't know for sure - the way you look the mapbox lib seems ok (i'm not an expert), esp since you use v2 that i have never used (maplibre was forked from v1). I think this is not a Martin issue. Martin generates tiles as MVT vectors for each zoom level. As you zoom in/out, you will get a different tile with different data. Bluriness is not part of it unless mapbox did something weird(?). |
Beta Was this translation helpful? Give feedback.
-
Hi @szygiser ,Would you mind to share your data here? Or would you like to share your SQL if it's a function source? |
Beta Was this translation helpful? Give feedback.
-
this is the data
zy.S
***@***.***
…------------------ 原始邮件 ------------------
发件人: "maplibre/martin" ***@***.***>;
发送时间: 2023年12月8日(星期五) 中午1:25
***@***.***>;
***@***.******@***.***>;
主题: Re: [maplibre/martin] Mapboxgl load Martin generated vector slices, small-scale automatic simplification, how to solve? (Issue #1046)
Hi @szygiser ,Would you mind to share your data here?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I use maplibre to load, but this issue also occurs
|
Beta Was this translation helpful? Give feedback.
-
@szygiser please use github web interface. Your email do not get through correctly (i fixed one of your emails). The data did not come in. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@szygiser What's the Spatial Reference here? There's no spatial reference information in your gdb file. |
Beta Was this translation helpful? Give feedback.
-
the Spatial Reference is CGCS2000_3_Degree_GK_CM_117E
WKID: 4548
you can convert it to WGS84
zy.S
***@***.***
Original Email
Sender:"Lucas"< ***@***.*** >;
Sent Time:2023/12/13 23:55
To:"maplibre/martin"< ***@***.*** >;
Cc recipient:"szygiser"< ***@***.*** >;"Mention"< ***@***.*** >;
Subject:Re: [maplibre/martin] Mapboxgl load Martin generated vector slices,small-scale automatic simplification, how to solve? (Issue #1046)
@szygiser What's the Spatial Reference here? There's no spatial reference information in your gdb file.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I duplicate it with our |
Beta Was this translation helpful? Give feedback.
-
And I saved the |
Beta Was this translation helpful? Give feedback.
-
That's because they are all too small so postgis droped them @szygiser |
Beta Was this translation helpful? Give feedback.
-
Mapboxgl load Martin generated vector slices, small-scale automatic simplification, how to solve?
Beta Was this translation helpful? Give feedback.
All reactions