-
Notifications
You must be signed in to change notification settings - Fork 154
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
Support Bearing and Pitch parameters #43
Comments
Hello, It is actually in the readme of the leaflet-master branch, in "Motivation" ( Fabien On Tue, Jun 28, 2016 at 9:59 AM, Vito Macchia [email protected]
Fabien Nicollet |
I see but couldn't be this considered as a feature request for next releases? I mean isn't there any transformation matrix or magic trick to reposition the markers correctly taking rotation and/or pitch into account in the update function? In MapBoxGL JS the main problem is that the markers use that awful binary format (which I'm sure it has some good technical reason to exist) which is unpractical, since it requires using MapBox studio which may be designer friendly but is programmer unfriendly. I thought that using MBGL inside/together with Leaflet would enable to use Leaflet coolest features such as custom markers and other plugins while keeping the wonderful MapBox vector tiles features and rendering... |
Yes, it can be considered a feature request, that's why this issue will stay opened. Transformation matrix/magic tricks will be tough ones, but you are welcome to try :) |
- Map over props - Extract access-token - Use Google Closure methods Note: bearing and pitch are not possible in Leaflet See mapbox/mapbox-gl-leaflet#43 Same for rotation. See Leaflet/Leaflet#268
this leaflet plugin is on life-support, no additional features are likely. |
Hi there,
while playing with this amazing library I found out that MapBoxGL bearing and pitch parameters are not well supported (also setting zoom causes the same troubles but that does not really make sense since we set the zoom level in the map constructor).
Looking at the plugin class constructor, it appears that all parameters are passed to the underlying MapBoxGL map instance (
mapboxgl.Map
). Sadly it seems that bearing and pitch parameters are not taken into account in the update function.To make clearer what I mean, I prepared this fiddle: try to pan and/or zoom the map and the marker position gets screwed up. 😞 This fiddle uses the leaflet-master branch version but the same happens with the master version and/or using clusters.
That's a pity because one of the most amazing features in MapBox, which was missing in Leaflet (I saw some FR in the past) was the ability to rotate the map, for instance with the device orientation change event.
I would suggest to find a way to support bearing and pitch parameters in the map update function, since they are (together with other features) a plus on the plain Leaflet map rendering.
If unfortunately this wouldn't be possible, then I suggest to state this in the README, or even better to clean up the unsupported parameters passed to the
mapboxgl.Map
constructor.Thanks,
Vito
The text was updated successfully, but these errors were encountered: