Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2013

    ClusterProvider redrawing unchanged points


    I am currently using the ClusterProvider and noticed the markers are being redrawn while zooming/panning even though nothing has changed (ie marker is still a cluster/single point and coordinates are the same).

    I understand it needs to compute again but why redrawing (marker is hidden and then shown again) if nothing has changed ?

    Is there a way to change this behaviour via the api ?

    You can observe this behaviour on the demo page here under the Marker / Create a marker cluster example.

  2. #2
    Regular Contributor
    Join Date
    Aug 2011

    Re: ClusterProvider redrawing unchanged points

    This is down to the way that clustering algorithms work - it is a consequence of the change in the view port in each of your examples. In order to minimize the number of transactions when building/breaking up clusters only a sub-set of the data will be considered at any one time. If a data point is not currently within the view port it won't be displayed anyway, so the data point is dropped from consideration quickly so other data points can be displayed.

    I haven't got access to the underlying HERE Maps API library code,but you can look at the code and commentary for an alternative clustering solution based on the original Too many markers blog post to see the underlying principles.

    Take the following examples -
    • When zooming in - this is the easiest and quickest operation. The viewport is smaller , clusters will break up and we only need to consider data points within the smaller window. In this case new(smaller) clusters + noise points will appear.
    • When zooming out - The viewport is larger, current clusters may need to coalesce. In this case new(larger) clusters + less noise points will appear.
    • When panning - The viewport has changed - additional data points may now need to be displayed, in this case new clusters + noise points outside of the old view port will appear.

    As far as a know there is no switch available in the API to alter this behaviour.

Similar Threads

  1. nokia.maps.clustering.ClusterProvider and dataPoints? IClusterPoint?
    By upixsoul in forum [Archived] Maps API for Javascript
    Replies: 3
    Last Post: 2012-10-12, 16:28
  2. Redrawing & Windows
    By julienpfe in forum Symbian User Interface
    Replies: 2
    Last Post: 2007-04-05, 09:49
  3. Redrawing views
    By bballbeng in forum Symbian
    Replies: 1
    Last Post: 2007-01-22, 06:55

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts