-
-
Notifications
You must be signed in to change notification settings - Fork 222
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mapboxgl load Martin generated vector slices, small-scale automatic simplification, how to solve? #1046
Comments
@szygiser I do not understand the question. Please provide more details |
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。 |
<!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> |
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(?). |
Hi @szygiser ,Would you mind to share your data here? Or would you like to share your SQL if it's a function source? |
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: ***@***.***>
|
I use maplibre to load, but this issue also occurs
|
@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. |
|
|
@szygiser What's the Spatial Reference here? There's no spatial reference information in your gdb file. |
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: ***@***.***>
|
I duplicate it with our |
And I saved the |
That's because they are all too small so postgis droped them @szygiser |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Mapboxgl load Martin generated vector slices, small-scale automatic simplification, how to solve?
The text was updated successfully, but these errors were encountered: