-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Scale control #1278
Comments
Correction: |
Hi @1ec5 ! Do you know if there is a plan to add this feature in an upcoming release? If not, how would you recommend me to proceed with the current iOS SDK 3.2.3 if I wanted to show a simple scale ? |
We haven't scheduled this feature into an upcoming release yet, but we aren't opposed to getting the feature in if someone steps up with an implementation. In the meantime, you have the right idea with the delegate methods (although you might find If you come up with an implementation that you feel would be appropriate for the SDK, we'd be happy to consider your PR. |
Thanks for pointing out Okay, if I am satisfied with my implementation I will propose a PR. |
Somewhat relatedly, here’s a quick way to get the geographic distance spanned by the entire map view: func mapView(mapView: MGLMapView, regionDidChangeAnimated animated: Bool) {
let screenWidthInPoints = Double(mapView.bounds.size.width)
let metersPerPoint = mapView.metersPerPointAtLatitude(mapView.centerCoordinate.latitude)
let screenDistanceInMeters = Int(screenWidthInPoints * metersPerPoint)
print("\(screenWidthInPoints) × \(metersPerPoint) = \(screenDistanceInMeters)m")
}
|
This is GL JS parity issue now that mapbox/mapbox-gl-js#2940 has landed. |
An Android equivalent is being implemented in #6555. |
Could you please update on the progress on this feature? |
Work towards this issue is happening in #7432 |
The scale bar is being implemented in #7631. |
Apple Maps (but not
MKMapView
itself) shows a scale (in both miles and kilometers) in the top-left corner of the map view while you pinch to zoom in or out. A scale would be a useful feature to bake intoMGLMapView
, either off by default or off except while you pinch. It would help to give context, especially since GL doesn’t snap the zoom level to increments and allows very high zoom levels.The text was updated successfully, but these errors were encountered: