gmap3 markers into a cluster at the same position - jquery-gmap3

On gmap3 when you have multiple markers with the exact same location, no matter how deep you zoom in, you won’t get a chance to see markers. If you remove clustering on a certain zoom levels (or remove it at all), you’ll see only one marker there(the top one), others will remain hidden underneath, since they stack on top of each other.My main problem is how to show the markers of the cluster with the exact same location

That a bit late for an answer but maybe someone got the same problem recently...
The solution for this particluar issue may be solved by diverse approaches:
1) use the spiderfier https://github.com/jawj/OverlappingMarkerSpiderfier
2) add an listener to the cluster and write your own paginator. This is my favorite solution right now, especially when more than 30 items are placed on the the same location.

Related

ARToolkit Multiple Mandatory Markers

I studied the multimarker documentation of ARToolKit for iOS and i have some troubles in achieving some sort of QR-Code.
I want, for example:
A set of 6 markers positioned differently on a picture, and when and only when ALL of them are present, some sort of video is displayed in the origin of them( i want to use some sort of CORNER Markers like QR-Code system ).
How to do this ? From what i've seen, on multimarkers, if 1 is present out of 6 for example, the object is displayed.
From looking into the ARToolKit code you can see that a MultiMarker is internally handled as one single Marker consisting of several Pattern:
https://github.com/artoolkit/artoolkit5/blob/master/lib/SRC/ARWrapper/ARMarker.cpp#L344
https://github.com/artoolkit/artoolkit5/blob/master/lib/SRC/ARWrapper/ARMarkerMulti.cpp#L75
That is why ARToolKit will always return true whenever one of the markers configured in the multi-marker configuration is visible.
Taking that into account ‘Multi-Markers’ are not the way to go for the target you would like to reach.
What you can do, however, is to configure each marker separately and add them as ‘Single-Marker’. Then you can query if all of these ‘Single-Markers’ are visible.
If so you can calculate the origin of all these ‘Single-Markers’ and render your object there.
You can get an idea on how to configure several ‘Single-Markers’ if you take a look here:
http://augmentmy.world/moving-cars-augmented-reality
Also take that example here on how to set to markers into the same coordinate system (and calculate the distance between them) you can use that as a starting point for calculating the origin between several markers:
https://github.com/artoolkit/artoolkit5/tree/master/AndroidStudioProjects/ARMarkerDistanceProj
I know that these are not iOS examples but I have only done Android so far. Also, the ARWrapper interface should be the same on Android and iOS, meaning to say there should not be much difference between these two.
I hope that helps

Plot user location onto line map

Ok, I've done some reading around the subject, have an idea of how I'd tackle my problem, but want to find out of this is the most efficient way, or if I'm missing something simple.
I have a line diagram of a section of railway that I'd like to plot the users location onto (the user being someone on a train moving up/down the railway).
Now, I initially went down the route of geo-referencing, but quickly realised this probably wasn't the way to go, as my image is not a real reflection of the area + I want the line diagram to be what the user sees.
OK, my though process of how I will tackle it:
I know the physical area so I could extract the coordinates along the railway, every x meters (my line diagram has a resolution of around 5m). Stick this into an array. Can anyone suggest a tool to do this?!
Allocate my line diagram a start and end, then match the image coordinates with the physical coordinates for the entire line.
Read in the users position and update where to draw the position based on the closest match in the array?
Does this sound doable, and would it give me decent results?
If you have more sophisticated answers, please do share.
It sounds reasonable in general. As the user is supposed to be on a train a simpler option may work where you just keep track of the physical distance moved and use that as a percentage distance along the line. This is a lot simpler to manage and could be backed up with some coordinate checkpoints to ensure you don't have a drifting error. I'd aim for a simpler implementation if you can.

How manage when several annotations has similar or the same coordinates and want to show them?

I have an app (iPhone) that uses MapKit and users can create things on the map (annotations in the remote database, with latitude and longitude).
Problem is that very often users put things in the same building, very close, even in the same coordinates. So you only see the most up-to-date annotation unless you tap it and another is shown, but the usability of this is horrible. No users realize they can do that.
Therefore I guess a way to group close points and when tap, show all of them. It seems the first step can be done with clusters and I see several libraries for iOS for that:
http://cocoapods.org/?q=on%3Aios%20cluster
I would like to know if you have any idea or suggestion to solve the second problem, or the whole problem.
Thanks in advance.
Depending upon the clustering library used, you may be able to get the clustered region that is represented. Then, upon cluster marker tap, you could zoom to that region.
The JS library Leaflet has this behavior so you can see what it's like:
http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-zoomtobounds.html
I realize this is a JS library not ObjC, but just linking it for demo purposes.

How to wrap locations that are close to each other in a single marker with Mapkit?

I am looking for a good and fast way to wrap locations that are in a specific range on a MKMapView in a single marker. Clicking on that marker brings you closer to the center point of this locations. You can see what I mean on the picture below.
mc donalds app - map sample screen
My first thought was to check a specific pixel range for each marker, hide the ones that are closer than X pixels to each other and get the center of them to create a new marker.
Did anyone of you ever did something similar?
There's a demo from WDC 11 or 10 that does exactly that, and coalesces based on proximity, not grid. Much better looking than DTCluster.
After a while of searching an testing, I found several frameworks for this like:
REVClusterMap, SuperPin, DTClusterMaker and a lot more. At the moment I stick with "REMarkerClusterer". It's pretty simple to implement and is free (MIT License)
https://github.com/romaonthego/REMarkerClusterer
Here is a nice article about clustering:
http://applidium.com/en/news/too_many_pins_on_your_map/
If someone else has good frameworks for this in his bookmarks/github-list, please post it here. I sill would like to see them ...

RevClusterMap radius

I'm using REVClusterMap in my project to get my map annotations clustered on different levels of zoom so I don't show all of them at once as there are many. The problem is that on certain levels, some of the annotations get included in a cluster that's not very close. So I'm guessing this is because of the radius in which they get clustered. Is there any way to do this? The BASE_RADIUS doesn't seem to be used anywhere.
Thanks
After some research, it seems that it doesn't work using the BASE_RADIUS after all. It splits the view in several areas and then clusters the ones that get in the respective area.

Resources