Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7061667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:30:07+00:00 2026-05-28T04:30:07+00:00

I m using Osmdroid to create an offline map Now, i want to implement

  • 0

I m using Osmdroid to create an offline map

Now, i want to implement my own pinch to zoom functionality for offline maps

When user uses pinch, i would like to zoom in/ zoom out to only a particular zoom level and not increment/ decrement zoom level by 1

Is there a way to do it? how can i go about this ?

P.S : yes, there are zoom controls, but i would like to make zooming feature more intuitive

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:30:08+00:00Added an answer on May 28, 2026 at 4:30 am

    I dealt with a similar question here, and provided the code for custom functionality on pinch. So basically, expanding on what I had in the answer, just basically do:

    int currentZoomLevel = mOsmv.getController().getZoomLevel();
    if (currentZoomLevel < (mOsmv.getControler().getMaxZoomLevel()) - 2) 
        mOsmv.getController().setZoomLevel(currentZoomLevel + 2);
    

    That is just an example of increasing the zoom level by 2, instead of just 1. I also wrote the code above from memory, so I’m not 100% sure if you call getController() to get the current and maximum zoom level, but I’m pretty sure that’s it. mOsmv, just in case you don’t get it, is an instance of the osmdroid map.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on an offline map using OSMdroid I have map tiles
I am new to android. I am implementing offline map using osmdroid & I
I'm using osmdroid and maps downloaded from OSM up to level 16. I was
I am using OSMdroid's MapView and I am planning to add custom maps. I
Using C#, I need a class called User that has a username, password, active
Using the variables extension, I want to change the background color of a cell
I would like to display the current position pointer using osmdroid. getController().setCenter(new GeoPoint(location)); This
I am using the fromPixels() function in osmdroid (3.05) like so: public boolean onScroll(ScrollEvent
I am using a customised version of the mapview (OSMDroid version). I am using
Using Entity Framework CodeFirst, how do I create a created datetime column that gets

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.