Skip to content

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.

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 levels
val worldView = 2.0 // See continents
val countryView = 6.0 // See entire countries
val cityView = 10.0 // See cities
val streetView = 15.0 // See streets
val buildingView = 18.0 // See individual buildings
// World and continent level
val 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
)
// Country and state level
val 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
)
// City and metropolitan area level
val 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 level
val 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
)
// Street and block level
val 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 level
val 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
)
  • 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.