Only one pin on same gps location (kml/google earth)? - google-maps

Hy,
I am developing some sort of monitoring system with GPS coordinates through KML in Google Earth. It happens a lot, that two or more pins are located in exactly the same GPS location (because of to small difference GPS to detect).
Is there any way to limit that only one pin is displayed on that location so I won't get that flower effect on click?
Thanks.

Not really. If you want to prevent it you should not create placemarks for locations that you already created one for. The extra advantage in that case is that you can group any names/descriptions or whatever and add that as one name/description to your one placemark. That way if the user clicks the placemark and the info pops up it will inform the user of all the devices that are there.
In my case I added some logic that if more than 10 devices were at the same point I would not show all the individual names anymore (too long list that won't scroll) and added a [a nn user more] type of message.

Related

How to show one place as active when embedding google maps?

I built a map for our website. There are different pages where we want to show a different places. Therefore i build this one map with all the needed places within. When i embed the card, it shows the summary of all pins in this map. Is there a way, to show one active pin, with its informations?
I searched for different parameters, with which you can alter the display of the card. But none of them is showing an explicit place.
This is a test map showing 4 pins. What should i do to show one chosen pin?
Hope this is understandable.
Thank you in advance.
When you say you want to "show one chosen pin" does it mean you have an info window for this marker and you want to display it?
If so, you can add unique ids for each infowindow and pass the chosen infowindow id to the url with url params such as https://mymapssite?chosenMarkerId=markerId
And then you can check if this param is given and if so do something like
document.getElementById("markerId").open(yourMapsRef, yourMarkerRef);

geolocation game event on marker approach

I need some information, I wan't to create a simple game with a geolocation API, I have looked at: Google Map API, MapBox.
I wan't to have the actual location of the user, he can see the map around him (like Pokemon GO), I can put a marker at 10 meters for example, when he approach the marker with his phone, I do an event, a popup appear, and he won a score is increased.
How can I do that ?
Mapbox SDK is versatile and allows for 'MapViews' inside of your own application's activity.
The have a great amount of information inside their docs. I'd say to start with their introduction apps and work your way up once you are familiar.
Ideas:
You could customize the user location icon to be the player and use the proximity controls around the users fine location to reach goals/tasks.
You could then have pins on the MapView that the user's location can interact with

See streetview enabled streets without pegman

I don't want to use streetview, I just want to see what streets allow it and capture a graphic (so as to identify gated neighborhoods where the cars could not get in.) Of course one can drag out the pegman and do a screen capture (or several if one wants to stitch them together). One can use that method to (w/o the pegman) to capture maps (w/o highlighting s/v/e streets) HOWEVER there are much nicer ways to get an 8000 x 8000 pixel map (for example).
Question: Is there same way to leave the display of streetview enabled streets on without hovering the pegman?)
I once had this happen while I was using Gmaps(maybe due to where I dropped the man) but have never replicated it.

How do you plot geo-encoded locations on a custom map?

I have a number of events in the US. I have addresses for these events, but it varies in accuracy. Some might be the full address, some might be just "Austin, Texas".
I'd like to plot these programatically on a map on a webpage with a marker as they'll change fairly regularly. The marker should be an internal link to the relevant row in the table of events lower down on the page.
The image doesn't need to be updated on the fly, just on the (say fortnightly occasions) when an event is added (e.g. a cached image is cleared and recreated)
Rather than use Google maps, I'd like to plot these on top of an image like this: http://0.tqn.com/d/geography/1/0/9/H/usa3.jpg
How would I go about putting markers on this image that correspond to the (rough) geolocation of these events?
Your best bet might be to use google maps and plot the locations and then just pull an image of the map - that way you can let google do all the work of placing the pins but not have to worry about people zooming, since it is a static image file.
Beyond that, you can type the locations into any mapping service to get a rough idea of the location and then place markers or dots on your map file in the same location. This would allow you to choose whatever image or color you want the icons/markers to be, since you will find and place them yourself.

Clickable markers on GTileLayerOverlay

I have a web application that needs to display 30,000 markers on a map at the same time. I don't want to use any kind of clustering. I need them to all be displayed.
I also need them to be clickable. The user can click on each point and a popup will come up with information about that point. Even at a low zoom level when there are thousands of markers in a single 256x256 square, the user needs to be able to click on them. It may be cumbersome for the user to click on a point thats bunched up with hundreds of other points, but if there happens to be one marker in the middle of nowhere, I want the user to be able to click on it right there instead of having to zoom in.
How do I do this? I know it's possible because I watched a video on google video where this guy creates a GTileLayerOverlay app that had clickable markers. He didn't explain how it was done though.
Is my only option to just remove the GTileLayerOverlay at high zoom levels and replace it with a true GMarker layer? I really don't want to do that. It seems over engineering to me.
If you were me, how would you go about this?
I found this example is in the Google Maps API Demo Gallery:
Clickable Tile Layer
This example creates a custom map type (GMapType) that shows regional borders and squares for county centers. When the squares are clicked, an info window opens with information about that county. The clickability is accomplished by passing in information about clickable pixel bounds in the cookies attached to the tiles, and doing a client-side check on mouseover for whether the mouse position was within the pixel bounds.
Here's some commentary on his method.
I don't have any experience with GTileLayOverlays, but I believe it is possible to accomplish what you're trying to do without using GMarkers.
Would it be possible to utilize clustering if each cluster could bring up a list of the markers it represents? It seems like having 30,000 markers visible at once would be visually confusing and difficult to navigate .