Comments (3)
It seems that you try to use map.transform.project to transform geographic coordinates (lon/lat) to pixel coordinates.
But this method transforms geographic coordinates to world (spherical mercator) coordinates (in OpenGL terms). To get pixel coordinates from world coordinates the pixelMatrix (map.transform.pixelMatrix) can be used (multiply and divide by w see geo.transform.coordinatePoint). Internally the projMatrix (map.transform.projMatrix) is used to transform world coordinates to NDC (-1 ... 1). Use
Line 851 in 15b9911
from maplibre-gl-js.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
from maplibre-gl-js.
This issue was closed because it has been stalled for 7 days with no activity.
from maplibre-gl-js.
Related Issues (20)
- Generating an image from the map canvas results in blank images. HOT 3
- Ability to set opacity for entire layer HOT 1
- Proposal: Support custom text transformation plugins HOT 2
- Incomplete feature.geometry during MapLayerMouseEvent HOT 1
- Custom Marker Overlaid by Default Pin in MaplibreGL JS Versions After 3.1.0 HOT 1
- Map freeze if mouse event below terrain HOT 5
- Update OSM wiki and possibly Wikipedia with relevant info HOT 4
- Large screen: unwanted pan-jump as pan action finishes (3d terrain) HOT 4
- How to enable rendering certain classes at levels above 12 HOT 2
- WebGL 1 phase out HOT 3
- Layer `type` change causing a full map reload HOT 5
- Text overlaps on some phone models HOT 1
- Strange results of `raster-contrast` paint property HOT 3
- Id missing on MapGeoJsonFeature on map.on('click', layerid, event) HOT 2
- App using terrain (raster-dem) crashes when zooming out after zooming in quickly HOT 3
- Raster tiles are much lower detail when terrain is enabled HOT 12
- How to use raster source with varying zoom levels? HOT 7
- standard-minifier-js of Meteor.js remove Promise HOT 2
- Map freeze if easeTo during move event HOT 7
- Missing documentation: Popup Constructor and PopupOptions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maplibre-gl-js.