Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

286
Views
Google_maps pellizcar para hacer zoom y la detección de doble toque es posible en Flutter ..?

Estoy trabajando en un mapa de Google. En realidad, quiero esta funcionalidad cuando el usuario hace zoom en el mapa o lo toca dos veces en una posición del mapa, se comportará como una aplicación súper. en el mapa de uber se volvió estático cuando el usuario hizo zoom o tocó dos veces, pero no puedo encontrar esta funcionalidad en el mapa de aleteo

Estoy usando este paquete google_maps_flutter: ^2.1.1

  Completer<GoogleMapController> completer;
GoogleMap(
          myLocationEnabled: true,
          myLocationButtonEnabled: false,
          mapToolbarEnabled: false,
          zoomGesturesEnabled: true,
          zoomControlsEnabled: false,
          rotateGesturesEnabled: false,
          scrollGesturesEnabled: true,
          tiltGesturesEnabled: false,
          markers: locationData.locationMarkers.values.toSet(),
          initialCameraPosition: CameraPosition(
            target: LatLng(widget.lat, widget.long),
            zoom: 16.4746,
          ),
          onCameraMove: (position) {
            latitude = position.target.latitude;
            longitude = position.target.longitude;
          },
          onCameraIdle: () async {
            if (latitude != null && longitude != null) {
              print("not workng");
              geoCodeProvider.setLatitude(latitude);
              geoCodeProvider.setLongitude(longitude);
            }
          },
          
          onMapCreated: (GoogleMapController controller) {

            widget.completer.complete(controller);

          },

      )
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Puede usar este código para agregar gestos en el mapa de Google

GoogleMap(
  initialCameraPosition: CameraPosition(
    target: LatLng(0, 0),
  ),
  gestureRecognizers: Set()
    ..add(Factory<TapGestureRecognizer>(() => TapGestureRecognizer()))
);

Manejo del nivel de zoom cuando el usuario interactúa con el mapa

 GoogleMap(
      zoomGesturesEnabled: true,
      tiltGesturesEnabled: false,
      onCameraMove:(CameraPosition cameraPosition){
         print(cameraPosition.zoom);
      },
    )

Agregue esto para el nivel de zoom mínimo o máximo en el mapa

minMaxZoomPreference: MinMaxZoomPreference(13,17)
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!