×

Discussion Board

Results 1 to 4 of 4

Hybrid View

  1. #1
    Registered User
    Join Date
    May 2012
    Posts
    43

    Exclamation nokia.maps.clustering.ClusterProvider and dataPoints? IClusterPoint?

    i tried the clustermarkers example:

    http://api.maps.nokia.com/en/playgro...ermarkers_desc

    but in the example does not says how to declare a dataPoints, how i do that?

    to add the datapoint array the example use:
    loadScript("../res/clustering/airports.js" .....

    is nokia.maps.clustering.IClusterPoint ??

    if then, nokia.maps.clustering.IClusterPoint how exactly i use the constructor? in the api reference :

    http://api.maps.nokia.com/en/apirefe...sterPoint.html

    is:

    Number | undefined altitude
    This property holds the value of altitude in meters.
    Number latitude
    This property holds the value of latitude as a numeric value in the range from -90 (south) to +90 (north) degrees.
    Number longitude
    This property holds the value of longitude as a numeric value in the range from -180 (west) to +180 (east) degrees.
    Number value Optional
    This property holds a numeric value that indicates the "weight" of the the data point within the cluster.

    but doesnt have a example or order of the arguments.

    can you show me how to declare a datapoint?

  2. #2
    Registered User
    Join Date
    May 2012
    Posts
    43

    Re: nokia.maps.clustering.ClusterProvider and dataPoints? IClusterPoint?

    what happen with you people? do your job:

    http://api.maps.nokia.com/en/maps/
    documentation.html#Marker_Clustering

    /**
    * Orginal source: http://openflights.org/data.html
    */
    var data = [
    { latitude: -6.081689, longitude: 145.391881 },
    { latitude: -5.207083, longitude: 145.7887 },
    { latitude: -5.826789, longitude: 144.295861 },
    ...
    ]
    Last edited by upixsoul; 2012-10-10 at 16:43.

  3. #3
    Regular Contributor
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    289

    Re: nokia.maps.clustering.ClusterProvider and dataPoints? IClusterPoint?

    I would have to agree that the annotation of the playground example does not explicitly state where the data is coming from, especially from the JS view. It is possible to work it out from the HTML view though.

    Looking at the <header> of http://api.maps.nokia.com/en/playgro...ermarkers_desc , I see the line:
    Code:
    <base href="http://api.maps.nokia.com/en/playground/examples/maps/clustering/clustermarkers.html" />
    , therefore the loadScript() function is loading data relative the base location i.e:

    http://api.maps.nokia.com/en/playgro...ng/airports.js

    which contains data of the form:
    Code:
    var data = [
    	{	latitude:	-6.081689	, longitude:	145.391881	},
    	{	latitude:	-5.207083	, longitude:	145.7887	},
    	{	latitude:	-5.826789	, longitude:	144.295861	},
    etc...

    As you state, the information is displayed more clearly in the user guide at http://api.maps.nokia.com/en/maps/do...ker_Clustering
    Last edited by jasfox; 2012-10-11 at 17:38.

  4. #4
    Registered User
    Join Date
    May 2012
    Posts
    43

    Re: nokia.maps.clustering.ClusterProvider and dataPoints? IClusterPoint?

    thanks for the reply!

Similar Threads

  1. how can i, create a nokia.maps.map.Polyline using a nokia.maps.routing.Manager?
    By upixsoul in forum [Archived] Maps API for Javascript
    Replies: 5
    Last Post: 2012-05-30, 15:54
  2. Is there a way to convert Maps Data from Nokia Maps 3 to be compatible with N Maps 2
    By dimchopicha in forum General Development Questions
    Replies: 6
    Last Post: 2011-01-09, 17:50
  3. Clustering on distance matrix
    By mrjayaram in forum Mobile Java General
    Replies: 0
    Last Post: 2010-07-21, 15:43
  4. Clustering on data matrix
    By mrjayaram in forum Mobile Java General
    Replies: 0
    Last Post: 2010-07-14, 12:42
  5. Replies: 3
    Last Post: 2010-03-03, 10:25

Posting Permissions

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