Offsetting multiple icons on the same point - google-maps-api-3

Have a map that shows reviews of parks. Some members have multiple reviews at one park, so there are 2 or more icons stacked on top of one another.
Is there a method in Google Maps v3 to offset icons that are on the same physical location by a very small distance? This way when the mapped is zoomed, readers can see multiple review icons and read each.

The Marker Spiderfier is one option (but it isn't part of the Google Maps API v3, it is a third party extension).

Related

google maps I don't see all street name with zoom 15

I'm using google maps api v3 to add shapes and markers to a map
The I use google maps static map api to get the image of that map and print it
The problem is that with zoom 15 I see the whole area but I don't get all streets name of that area.
https://maps.googleapis.com/maps/api/staticmap?center=24.8147642107468,-107.375049591064&zoom=15&size=640x440&scale=2&format=png32&language=es&maptype=roadmap&markers=color:0xff0000|24.8165756517471,-107.376508712769&path=color:0xffffe1|weight:2|fillcolor:0xffffe1|enc:samvC~nlnS?{K}\s#aPqNyDkH}#aK|#aGzAcEdBiC`GeEeCuLlBwFpEr#hFuAl]ePjD~Bw#xJlAl_#pGlLeC`VmAh]{KX
link
With zoom 16 I get all streets name but the area doesn't fit in the image
https://maps.googleapis.com/maps/api/staticmap?center=24.8147642107468,-107.375049591064&zoom=16&size=640x440&scale=2&format=png32&language=es&maptype=roadmap&markers=color:0xff0000|24.8165756517471,-107.376508712769&path=color:0xffffe1|weight:2|fillcolor:0xffffe1|enc:samvC~nlnS?{K}\s#aPqNyDkH}#aK|#aGzAcEdBiC`GeEeCuLlBwFpEr#hFuAl]ePjD~Bw#xJlAl_#pGlLeC`VmAh]{KX
link
How can I resolve this?
Saludos
rubenc
Short answer: you can't.
As you have discovered, you can't use the staticmap api to get the image you want. So you have to do it another way. Request multiple images and stitch them together in whatever interface you are creating?

How many layer can be added Google Maps ?

I am exploring Google Maps Javascript API to start our new project. Does anyone know how many layers can be added to Google Maps?
Google Maps API v3 doesn't stack the information as layers. There is a fixed group of layers, and each entity gets pushed into the corresponding layer based on its type.
If you meant overlays, then Google Maps has a layer in particular to add each overlay. I've never loaded that many overlays to make the browser unresponsive, but in general that's the google way. You are free to load thousands of entities of a given type, but it's up to you to decide what's the practical limit to keep browser responsiveness.
10 layers -if you add more you get a message a message to say there are too many layers to display. I haven't discovered yet how many features you can add to a layer

Any minimal or night view or overlay for google maps api v3?

The default overlays that come out of the box for Google Maps API v3 Street, terrain, etc. appear to busy. I want to have a good "night" or "minimal" overlay that is like leaflet night view or minimal view http://leafletjs.com/examples/layers-control.html (select the layer control to switch between views) or a simple white and gray map without all the business of the colors. Are there such overlays that exist or settings that could be used so that I could use it/customize it for my Google Map?
You can create your own style. Here is the documentation
https://developers.google.com/maps/documentation/javascript/styling
Included is a style wizard that generates all the JSON for you
http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html

Google Maps obtain a list of places in current map

Is there a way to obtain a list of places in current map? For example when I zoom in to below map, there're 7 places. I want to put an image on top of existing place name.
Or, is it possible to replace all the existing names, e.g. "Dynamo Donuts", with clickable images?
http://oi41.tinypic.com/1zvd8ok.jpg
Yes it is possible. First of all you have to check if there are any places within the area you want. You can accomplish that with places library of google maps.
Once you have the places (location of the places) you can do whatever you want. You can place markers or images, clickable or not.

Google Maps SDK for iOS: Relocating the Google logo

For the new sdk for iOS, is the Google logo relocatable, just like Mapkit pre-iOS 6? Also, is it allowed under terms of conditions?
Thanks
This is actually possible to some sort of degree by changing the visible portion of the map, aka padding:
let padding = UIEdgeInsets(top: 0, left: 0, bottom: 100, right: 0)
mapView.padding = padding
This can be useful if you have a drawer like view on top of the map and you want the center to be moved accordingly when you change the camera (without moving the whole UIView which performs worse). Or just to move the logo to the right.
If you take a look at the documentation [map_padding][https://developers.google.com/maps/documentation/ios-sdk/map#map_padding]
If you display a custom UI at the bottom of the map, add padding to the bottom of the map so that the logo and legal notices will always be visible.
Just as a heads up, when changing the padding, if you move the camera, you may want to add an inset to it to cancel that margin that you just used to move the logo (to cancel each other out):
mapView.camera(for: bounds, insets: insets)
In the terms of the Google Maps there are following sentences concerning the Google logo:
8.4 (b) Restrictions. In using Google Brand Features, you will not:
...
(iii) have the Google logo as the largest logo in your Maps API
Implementation or on your website (except as displayed in the map
image itself);
and furtherer more there also is the sentence
9.4 Attribution.
(a) Content provided to you through the Service may contain the trade names, trademarks, service marks, logos, domain
names, and other distinctive brand features of Google, its partners,
or other third party rights holders of content indexed by Google. When
Google provides this attribution, you must display it as provided
through the Service or as described in the Maps APIs Documentation and
may not delete or in any manner alter these trade names, trademarks,
service marks, logos, domain names, and other distinctive brand
features.
So as I read this you are not allowed to modify the position or any attributes of the Google logo itself. But I didn't found any restriction which do not allow a layer or something above the Google logo.
But please note I am not a lawyer and in my purposes I don not see any reason why to modify the Google logo.
Best regards
Robert

Resources