Google Maps SDK for iOS: Relocating the Google logo - google-maps-api-3

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

Related

Flex MicroForm Credit Card Brand Logos

I am using the Flex Microform v4 and saw that we are required to display credit card brand logos along with the credit card number. Looking at the data from the card detection event object. I don't see any images or urls to images being sent back. I also can't find anything in the documentation about how to display these card brand logos. I am planning to have images in an assets file that are mapped to the card detection brandedName field.
Is this the right/expected way to handle the display of credit card brand logos?
Yes this is exactly the right approach Brian.
This allows you to use images that are exactly appropriate for your checkout, be that in size, color palette, or the use of brand logos vs acceptance marks etc. This way you can craft the exact UX you want your customers to have and ensure that everything blends seamlessly with your site's look and feel.
There is a quick example of this in the documentation for the "cardTypeChange" event that also covers other elements on your page such as using brand appropriate terms for the security code.
But here's an even simpler snippet focused on just a card image change
microformInstance.on('cardTypeChange', function(data) {
if (data.card.length === 1) {
yourCardImageElement.src = '/path/to/your/images/' + data.card[0].name + '.png';
} else {
yourCardImageElement.src = '/path/to/your/images/default.png';
}
});
Note that event gives back an array of detected card types, so you might only want to show the card image when that's been narrowed down to a single card (as per this example).
Alternatively you could use this information to progressively hide or turn greyscale, acceptance marks that do not appear in the array to provide dynamic feedback to the user as they type.
Further, as you have complete control over your images, you could choose to do something like add your images to an existing sprite sheet your site might have and reap the benefits of having all your images load up front, then just manage using css classes.
Most of the networks provide excellent guidance on how to use their marks and source materials various image formats. Here's some useful links:
Visa
Mastercard
American Express
Discover

How to control the style of labels in StreetViewPanorama?

I need to embed some Google Maps API in a templating system I haven't full control over (CrowdFlower's), but the "host CSS" is breaking the styling of the labels of the streets in StreetViewPanorama, making them difficult to read. E.g. the default styling you get by using Google Street View directly is:
... but what I get is:
You can see that the "Christ Church Ln" label under the bins is barely visible.
Google API's docs show how to style maps but not how to do the same with [StreetViewPanorama.
I have tried "inspecting" the labels to find out the name of the class used by Google and restore it to more readable features but did not manage to find it, probably my skills are not advanced enough.
Can you help? If you want a sandbox to play with, try using my testbed here. Thanks.
G.

google maps API: need to keep poi.business persistent across zoom levels

I've seen a score of questions/answers on how to hide poi.business icons/labels from google maps, but what I need is for them to show up persistently across zoom levels. For example, even when I have featureType poi.business styler visibility set to "on", the icon shows up in ROADMAP type but not on the same HYBRID map counterpart. I need the icons/labels to show up on both map types at the same zoom level.
I've tried this with both the google maps API v3 as well as the static map URL formulation and the same problem shows up. It appears the server determines that at certain zoom levels of the HYBRID map certain icons/labels should be hidden. I would like to override this decision. Is there a mechanism for this? (On the HYBRID map, if I haven't been clear.)
Thanks!
It seems no, at least for icon. From google docs MapOptions object specification:
styles | Array. | Styles to apply to each of the default map types. Note that for Satellite/Hybrid and Terrain modes, these styles will only apply to labels and geometry.

Image Overlay using the Street View Image API

I am wondering if i am allowed to add an image overlay to a static Google Street View image.
The idea behind this question is adding a person/object to the street view image in an android application (and displaying it) without further processing of the outcome.
Would this violate "10.1.3 a)" of the Google Maps/Google Earth APIs Terms of Service?
I am not really sure about that, because "(i) creating server-side modification of map tiles" is listed as a forbidden example, but I only want to do add a client-based overlay without modifying the Street View Image as itself.
Thanks for your help!
Did you read this section? https://developers.google.com/maps/documentation/javascript/streetview#StreetViewOverlays
It seems that the Street View API supports overlays.
If you read the link from Vitor, it says that:
"Currently, the types of overlays which are supported on Street View
panoramas are limited to Markers, InfoWindows and custom OverlayViews.
"
So unless you implement your own custom overlayview, image overlays (like a ground overlay) aren't supported

getTile() returns nothing in native map types, how to get back functionality?

On an early version of the maps 3 api, I build some "overlay" functionality to do the following using a custom map type - the idea was that as opposed to always serving my tiles on top of google's tiles, I would only show google's tiles when needed - that is either when the tile is outside of my zoom and boundaries or when my tile has transparency (mostly due to the fact that the outside borders of my overlays may follow rivers, etc). It worked like so:
When getTile was called on my type, determine if I should be serving the given tile for the given level.
If I should be serving the tile, determine if the tile had any transparency - if it did, get the tile from the default map using
map.mapTypes.get(google.maps.MapTypeId.ROADMAP).getTile(coord, zoom, ownerDocument)`
then append my image to the top of the returned div and display that. Otherwise, just serve my tile.
If I should not be serving, the tile, just return
map.mapTypes.get(google.maps.MapTypeId.ROADMAP).getTile(coord, zoom, ownerDocument)
So, it seems like due to some thievery, getTile no longer returns anything on google's native map types, which bring up two questions:
Is there any way for me to tell the map that it should be displaying my tile as an overlay as opposed to a full tile without having to have my whole map be an overlay?
Is there any way to tell the map that it should be displaying its own tile as opposed to mine?
The overlay maps work as a solution, but performance is not great, there are quite a few redraws as google first draws its own tiles and then overlays them with mine. Since 99% of my tiles are a complete overlay (no transparency) this seems like quite a waste of bandwidth. It would be great to be able to pass back metadata from getTile indicating whether the default google tile should be drawn at all (or indicate that fact in some other callback). What I had previously seemed like an elegant solution and performed well - the overlay methodology is definitely a step back. Marcelo, I'm not sure how my title does not reflect my question... did you read the complete text of the issue?
You can't access the base map types. It's been intentionally disabled by Google due to ongoing abuse.
At some point this was reported as a bug, but you can read the comments by members of the maps team on this thread:
Quote from that page:
Unfortunately we discovered an increasing number of cases of developrs
using the default map types to gain access to and use Google map tiles
outside of a google.maps.Map object, which is not permitted by the
Terms of Service. We were therefore forced to move the internal map
types to a private registry. If you have specific reasons for needing
access to the map types that are compliant with the Terms of Service,
please update this issue with your use case, and if there is
sufficient demand we will look into whether we can provide a
supportable solution for your requirements.
by Thor Mitchell (Google Employee - Maps Team)

Resources