Giter Club home page Giter Club logo

mapchange's People

Contributors

bricolsoftconsulting avatar johnjohndoe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mapchange's Issues

Background thread callbacks

The current implementation of the callbacks into the MyMapView.OnChangeListener pretty much guarantees that all calls an application receives will happen on the background threads constructed by java.util.Timer. This is highly bad practice, especially in the Android framework. An application should be able to count on callbacks being posted to the main thread so they can safely manipulate the UI (especially when the callback is associated with a View) and not be left to do this work through extra Handlers as the sample code does.

This application should be reworked to post onChange() to the main thread. This can even be done with the post(), postDelayed() and removeCallbacks() facilities built directly into View (and therefore, MapView) which would eliminate the need for java.util.Timer altogether.

How to integrate android-mapviewballoons library with an OnSingleTapListener

I use the android-mapviewballoons library to show balloon popups on the map. Additionally, I would like to hide all popups when I tap on the map. The library already implements this functionality using a OnSingleTapListener that works on a TapControlledMapView. This can be seen in the example application project: android-mapviewballoons-example. Choose the third activity, named "Tap close / Doubletap zoom" to test the behavior.

Your library requires the map view to be a MyMapView class. Therefore, I have problems to attach the previously mentioned OnSingleTapListener. Could you help me to sort this out? I opened a similar issue for the android-mapviewballoons project.

Timer never fires under certain circumstances

I found that computeScroll is indefinitely called under certain circumstances particularly when zoomed out, which means that the timer always is reset and never fires. So I needed to modify your computeScroll() method to check how many times it had been called and only reset it if it is under a specific limit.

private int computeScrollCount = 0;
private final static int MAX_SCROLL_COUNT = 25;

@Override
public void computeScroll()
{
    super.computeScroll();

    // Check for change
    if (isSpanChange() || isZoomChange())
    {
        if (computeScrollCount < MAX_SCROLL_COUNT) {
            // If computeScroll called before timer counts down we should drop it and 
            // start counter over again but dont let this occur indefinitely
            resetMapChangeTimer();
        }
        computeScrollCount++;
    }
}

then you need to reset the computeScrollCount=0 when the Timer fires.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.