Zoom Levels
MapConductor utiliza niveles de zoom para controlar la escala y el nivel de detalle del mapa. El sistema de zoom sigue aproximadamente las convenciones de Google Maps, aunque puede variar ligeramente entre proveedores debido a diferencias en sus implementaciones internas.
Entender los niveles de zoom
Section titled “Entender los niveles de zoom”Los niveles de zoom en MapConductor se representan como valores Double, normalmente en el rango de 0 a 21, donde:
- Valores más altos = Más zoom (más detalle, área más pequeña).
- Valores más bajos = Menos zoom (menos detalle, área más grande).
- Valores fraccionarios = Interpolación suave entre niveles enteros.
// Examples of different zoom levelsval worldView = 2.0 // See continentsval countryView = 6.0 // See entire countriesval cityView = 10.0 // See citiesval streetView = 15.0 // See streetsval buildingView = 18.0 // See individual buildingsReferencia de niveles de zoom
Section titled “Referencia de niveles de zoom”Escala global (0–5)
Section titled “Escala global (0–5)”// World and continent levelval worldLevel = MapCameraPosition( position = GeoPoint.fromLatLong(0.0, 0.0), zoom = 2.0 // Shows continents and oceans)
val continentLevel = MapCameraPosition( position = GeoPoint.fromLatLong(39.8283, -98.5795), // USA center zoom = 4.0 // Shows entire continent)Escala de país / región (6–9)
Section titled “Escala de país / región (6–9)”// Country and state levelval countryLevel = MapCameraPosition( position = GeoPoint.fromLatLong(39.8283, -98.5795), zoom = 6.0 // Shows entire country)
val stateLevel = MapCameraPosition( position = GeoPoint.fromLatLong(36.7783, -119.4179), // California center zoom = 8.0 // Shows state or large region)Escala de ciudad / barrio (10–15)
Section titled “Escala de ciudad / barrio (10–15)”// City and metropolitan area levelval metropolitanLevel = MapCameraPosition( position = GeoPoint.fromLatLong(37.7749, -122.4194), // San Francisco zoom = 10.0 // Shows metropolitan area)
val cityLevel = MapCameraPosition( position = GeoPoint.fromLatLong(37.7749, -122.4194), zoom = 12.0 // Shows city center and suburbs)// District and neighborhood levelval districtLevel = MapCameraPosition( position = GeoPoint.fromLatLong(37.7749, -122.4194), zoom = 13.0 // Shows districts)
val neighborhoodLevel = MapCameraPosition( position = GeoPoint.fromLatLong(37.7749, -122.4194), zoom = 15.0 // Shows neighborhoods and major streets)Escala de edificio / detalle (16+)
Section titled “Escala de edificio / detalle (16+)”// Street and block levelval streetLevel = MapCameraPosition( position = GeoPoint.fromLatLong(37.7749, -122.4194), zoom = 16.0 // Shows street layout)
val detailedStreetLevel = MapCameraPosition( position = GeoPoint.fromLatLong(37.7749, -122.4194), zoom = 18.0 // Shows individual streets and small buildings)// Building and detail levelval buildingLevel = MapCameraPosition( position = GeoPoint.fromLatLong(37.7749, -122.4194), zoom = 19.0 // Shows individual buildings)
val maximumDetail = MapCameraPosition( position = GeoPoint.fromLatLong(37.7749, -122.4194), zoom = 21.0 // Maximum zoom level)Notas por proveedor
Section titled “Notas por proveedor”- Los valores de zoom exactos y el rango máximo pueden variar según el SDK de mapas (Google Maps, Mapbox, etc.).
- MapConductor normaliza en la medida de lo posible, pero siempre conviene probar en los proveedores que uses para ajustar los niveles a tus necesidades.
En general, usa el parámetro zoom de MapCameraPositionInterface como una guía relativa de escala, y ajusta los valores para que coincidan con la experiencia de usuario deseada en cada proveedor.