-
-
Notifications
You must be signed in to change notification settings - Fork 976
Add support for MLT #6570
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
Add support for MLT #6570
Conversation
|
@Salkin975 I've opened the following branch for integration, and this PR to see that we keep this branch working and up-to-date with the main branch.: I tried to copy over the code from your branch but I'm not sure this is the right approach to solve it. I would recommend as an initial step to only try and make mlt work in maplibre without optimizing the buckets and other things. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6570 +/- ##
==========================================
- Coverage 92.29% 92.20% -0.10%
==========================================
Files 283 284 +1
Lines 23558 23652 +94
Branches 5001 5025 +24
==========================================
+ Hits 21744 21808 +64
- Misses 1814 1844 +30 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
* add basic render tests for mlt feature rendering * add city and country label rendering test * change test path * simplify styles * simplify styles by removing feature filters * removed allowed --------- Co-authored-by: Niklas Greindl <niklas.greindl.@rohde-schwarz.com>
|
Unfortunately, coverage report does not work on the worker as is, and there might be other configuration needed in order to make it work, but the code is fully covered. |
|
For future reference, I've used the following page to check the geometry rendering and conversion, <!DOCTYPE html>
<html lang="en">
<head>
<title>Display a map</title>
<meta property="og:description" content="Initialize a map in an HTML element with MapLibre GL JS." />
<meta charset='utf-8'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel='stylesheet' href='../../dist/maplibre-gl.css' />
<script src='../../dist/maplibre-gl-dev.js'></script>
<style>
body { margin: 0; padding: 0; }
html, body, #map { height: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<script>
const map = new maplibregl.Map({
container: 'map', // container id
style: 'https://harelm.github.io/demotiles/tiles-mlt/plain.json', // style URL
center: [0, 0], // starting position [lng, lat]
zoom: 1, // starting zoom
maplibreLogo: true
});
map.once('load', () => {
map.addSource('gj', {
type: 'geojson',
data: []
});
map.addLayer({
id: 'filll',
type: 'fill',
source: 'gj',
filter: ["==", "$type", "Polygon"],
paint: {
'fill-color': 'red'
}
});
map.addLayer({
id: 'lineee',
type: 'line',
source: 'gj',
filter: ["==", "$type", "LineString"],
paint: {
'line-color': 'blue'
}
});
map.addLayer({
id: 'pointtt',
type: 'circle',
source: 'gj',
filter: ["==", "$type", "Point"],
paint: {
'circle-color': 'green'
}
});
map.on("mousemove", (e) => {
const features = map.queryRenderedFeatures(e.point);
if (features.length > 0) {
console.log(features.map(f => f.geometry));
map.getSource('gj').setData({
type: 'FeatureCollection',
features: features.filter(f => f.source !== 'gj')
})
}
})
})
</script>
</body>
</html> |
* Initial mlt support hack * Update min test * Update build test * Use released package instead of mocks * Update mlt package to latest version * Fix lint * Initial implementation * Update package version * Fix lint * Update package and relevant code. * Update mltpackage to latest * Update mlt to latest version * Add basic render tests for mlt (maplibre#6631) * add basic render tests for mlt feature rendering * add city and country label rendering test * change test path * simplify styles * simplify styles by removing feature filters * removed allowed --------- Co-authored-by: Niklas Greindl <niklas.greindl.@rohde-schwarz.com> * treat mlt as binary data * Update mlt tiles * Update changelog * Update build size, this will probably change in next version of mlt * Move mlt vector worker to parent directory. * Add support for queryrenderedfeatures * Update to latest mlt package * Add tests to feature index. * Fix lint, simplify test * Add html example, still without an image. * Update mlt to latest version * Rename mlt to match other files in that folder * Update expected bytes. * Update link to where the style is. * Add image for the docs --------- Co-authored-by: Niklas Greindl <154528139+Salkin975@users.noreply.github.com> Co-authored-by: Niklas Greindl <niklas.greindl.@rohde-schwarz.com>
* Initial mlt support hack * Update min test * Update build test * Use released package instead of mocks * Update mlt package to latest version * Fix lint * Initial implementation * Update package version * Fix lint * Update package and relevant code. * Update mltpackage to latest * Update mlt to latest version * Add basic render tests for mlt (maplibre#6631) * add basic render tests for mlt feature rendering * add city and country label rendering test * change test path * simplify styles * simplify styles by removing feature filters * removed allowed --------- Co-authored-by: Niklas Greindl <niklas.greindl.@rohde-schwarz.com> * treat mlt as binary data * Update mlt tiles * Update changelog * Update build size, this will probably change in next version of mlt * Move mlt vector worker to parent directory. * Add support for queryrenderedfeatures * Update to latest mlt package * Add tests to feature index. * Fix lint, simplify test * Add html example, still without an image. * Update mlt to latest version * Rename mlt to match other files in that folder * Update expected bytes. * Update link to where the style is. * Add image for the docs --------- Co-authored-by: Niklas Greindl <154528139+Salkin975@users.noreply.github.com> Co-authored-by: Niklas Greindl <niklas.greindl.@rohde-schwarz.com>
Launch Checklist
This PR will introduce support for MLT format.
CHANGELOG.mdunder the## mainsection.