Start a new topic
Solved

avoiding the stacking of POIs

avoiding the stacking of POIs

Please find clustering.js attached - just n case you came across but noticed that public dropbox link is no longer working

zip
(49.9 KB)
Hello Jacob,

Please download the .zip file from the forum post above. Inside you will also find the clustering.js file.

Thanks
Eva

 

The clustering.js file id deleted. I couldnt find it. Can you upload the example again?

Hello,

Since the dropbox's public folder hosting functionality was disabled in the meantime, please find referred sources at
https://s3-eu-west-1.amazonaws.com/wikitude-webapps/tmp-14days/clustering.zip
Note that the sources are quite outdated but the clustering.js may still help.

Thanks
Eva

 


1 person likes this
Hello Farshid,

The two links that were not updated are now updated. Please also be aware that if there are links redirecting to Dropbox files then, as this is a forum post created 3 years before, they are no longer valid.

Thanks
Eva

 


1 person likes this

Unfortunately, none of the links under this thread are active. I have no way of finding this clustering.js  anywhere. Can you guys provide a valid link? thanks.


1 person likes this

Hi!
It's quite hard to fix the issue remotely. I must say that Geo-Experiences in the Wikitude app (e.g. Wikipedi) is a very similar agorithm to cluster POIs in same angle. When user presses the "aggregated POI" a list of the POIs is shown.

Note that the provided snippet is just a draft of how one could achieve an easy POI aggregation but there are way more sophisticated approaches out there. Unfortunately I have no AR-Snippets to share.

Best regards
When I use the attached clustering.js and poisFromWebservice.js the clustering of POIs seems successful BUT some POIs are getting lost. Missing POIs are not displayed if clusterAngle gets higher:

        // passing World.markerListUnclustered with count 30 
        var clusterAngle = 20 // please note if clusterAngle = 1 then all POIs are shown
        World.placeGeoObjects = ClusterHelper.createClusteredPlaces(clusterAngle, World.userLocation, World.markerListUnclustered);
        for (var i=0; i<World.placeGeoObjects.length; i++) {
            for (var j=0; j<World.placeGeoObjects.places.length; j++) {
                var singlePoi = World.placeGeoObjects.places;
                singlePoi.altitude =  j * 250;
                World.markerList.push(new Marker(singlePoi));
         }}
        // getting World.markerList with count 25, thus 5 POIs are gone, but if I change clusterAngle to 1 - all POIs are shown

What may be the causes of this? I tried reading the source but I have not yet determined the reason.

Hi there!

Note that it is not enough to "just define a clustering" once in your code.

* You need to ensure that the user's location is repoted properly to the AR-view (via setLocation).

* Also note that you need to re-cluster your pois when the user moves or location updates arrive (letting user "jump for several meters", which destroys your previous calculations)

Also consider to implement your own clustering approach, the one I provided in the old posts is very basic and groups the POIs by view-angles.

Best regards

Hi I've been following the thread and the steps but I can't manage to make my POIs to look good on the screen they still appear one behind the other or way up on the screen (like on the roof)

I'm attaching the 3 files I'm using so people can see and maybe can help, I don't know where the error can be.

Please if anyone can help

Thanks
Hi,

Could you provide my the sollution about the "stacking of POIs"?
I have lost with the previous posts and I don't know what to do.

Thank you in advance!

Hi, can you please provide piece of code where, and how exactly you set altitude as '0' in setLocation call on the architectView?  Is it in capturescreen.js or marker.js? I cant get my clustering to work. 

 I'll appreciate if you can help me with this. Thanks

 

Hi there!

 

You're right bubbleAngle should be clusterAngle.
Please use clusterAngle between 10 and 30 and check your results. Also ensure your passed pois have set all required attributes so "ClusterHelper.angleBetween" etc. work as expected.

Please keep in mind that this is a very basic implementation. There are way more sophisticated approaches available to play around with.

Kind regards,
Andreas

Hi , I'm also trying to do this to avoid clusteing my POIs , but I don't get what is the difference between "clusterAngle" and "bubbleAngle" ? the bubbleAngle isn't even defined in the code. and even if I assume them the same by 'var bubbleAngle = clusterAngle;' and try to run the code , when I debug I see the cluster clusteredPois array is empty. I'll appreciate if you can help me with this. 

thanks
Login or Signup to post a comment