Reordering overlays of GMSMapView - google-maps-sdk-ios

I'm adding several GMSOverlays (specifically GMSPolylines) to my GMSMapView. On certain occasions (taps) I now want to reorder them s.t. a new polyline appears to be on top of all others. Is there any way to change the order of the overlays added to a GMSMapView?
I've already tried removing the overlay and adding it again by doing
overlay.map = nil;
overlay.map = mapView;
but that doesn't do the trick.
Thanks for any help!
P.S.: I'm using version 1.2.2 of the Google Maps SDK for iOS.

The Z-index feature is part of the google maps sdk for ios Version 1.4.0 - July 2013
Features list mentions:
Added a zIndex property on all overlays. Z-Indexes are calculated in two groups: GMSMarkers and all other overlays.

Related

Google maps set heading not working and map remains on heading to north

I am trying to do: map.setHeading(180) but this doesn't work and map remains heading to north. Everything else is working - I am using the very basic template of Gmaps from their docs, zoomings, pannings, markers and other things work as excepted, but the heading not. What am I missing in here?
For example, I got the position and heading from the GPS and I move the marker using marker.setPosition(position) which also works as excepted.
Tilt and rotation are now supported programmatically and by user input when using WebGL rendering. Please see https://developers.google.com/maps/documentation/javascript/webgl/tilt-rotation for documentation and examples.
Try beta version of JavaScript API. add v=beta in url.
The reason for this is that you can use setHeading if your map is displaying 45 degrees imagery as stated on the documentation.
It looks like your use case is the same as this existing Feature Request which is requesting for a feature to change the orientation of the map. You can star the issue to receive updates regarding the issue. You can also leave a comment on the issue regarding your use case.

Vaadin Openlayers Wrapper maximum zoom level for google maps layer is not achieved

I hope somebody already had (and solved) this problem since I searched a lot for a solution with no success.
The thing is I have a GoogleHybridMapLayer and a OpenStreetMapLayer, with the google hybrid I can only reach 2 or 3 levels less of zoom then what I get with OSM or going directly to google maps api on other apps. I even tested it on the openlayers google maps demos and they fully zoom in, so I assume it is a problem with the vaadin addon.
I tried everything i could think of and find on the web, including setting the setJsMapOptions params on the OpenLayersMap like this:
map.setJsMapOptions("{projection: "
+ "new OpenLayers.Projection(\"EPSG:102113\"),"
+ "units: \"m\","
+ "numZoomLevels: 20,"
+ "maxResolution: 156543.0339, "
+ "maxExtent: new OpenLayers.Bounds(-20037508, -20037508,20037508, 20037508.34)}");
This is crucial for our application since the user is required to set points that are very close to each other.
So, how can I achieve the same zoom level on openlayers wrapper addon than on reqular openlayer google maps?
Thanks in advance.
Matti Tahvonen was kind enough to help me out with this issue by increasing the zoom level in the native client method that I did not see.
The latest version in the svn repo has this fix available
Dont forget to recompile the widget.

styledmarkers on a google map now all change to style of last marker added since 21 Nov 12

I have a map which calls the Gabriel Schneider StyledMarker code.
http://google-maps-utility-library-v3.googlecode.com/svn/trunk/styledmarker/src/StyledMarker.js
Since today they now behave differently on maps and the example code does not behave as predicted.
Previously you could add bubble markers with 'A' and 'B' shown as the text. Now the first one shows 'A' if created on its own, but if a second marker is added with 'B' as the text the first one also changes to 'B'. (Similarly colours are changed).
Use his simple example to display the problem
http://google-maps-utility-library-v3.googlecode.com/svn/trunk/styledmarker/examples/simple.htm
the three markers should be different.
Anyone know how to fix this?
As of Nov 26, 2012 a partial fix was made to StyledMarker.js to make it work better with API v3.10.
The link:
<script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/styledmarker/src/StyledMarker.js"></script>
However it only fixes 2 out of 3 problems:
Color of marker and text in marker now work fine with v3.10
However the size of the marker is still overwritten with each additional marker added.
I updated the bug report in the Google Maps API v3 issue tracker for this and hope it will be fixed as well soon.
A new version of the Google Maps API v3 was released. If you specify version 3.9, it still works:
http://www.geocodezip.com/v3_styledmarker_examples_simple_v39.html
v3.10 does not work:
https://developers.google.com/maps/documentation/javascript/basics#Versioning
Which will be an issue for anyone using this library when v3.9 is retired in about 6 months, unless v3.10 and 3.11 get fixed...
Created issue in the Google Maps API v3 issue tracker

Can the google map type be changed to RoadMap when zoomed out?

Google has recently made changes to their maps, it switches to Terrain mode when zoomed out (from zoom level 17 onwards). Is it possible to switch it back or force it to remain in RoadMap mode using the javascript API?
You can not do it. Because Google changed tiles itself, so we cannot do it anything.
Kasheftin has come up to a solution to this as an answer to his question "Auto switch to other mapType on max zoom level in google maps": https://stackoverflow.com/a/18147423/348485

Hiding the base map in Google Maps V2

Does anyone know how to hide the base map in Google Maps V2? I've added the following lines in my attempt to remove the standard map types, but it seems to insist on showing some sort of base map:
map.removeMapType(G_SATELLITE_MAP);
map.removeMapType(G_HYBRID_MAP);
map.removeMapType(G_AERIAL_MAP);
map.removeMapType(G_PHYSICAL_MAP);
I'm adding a KML-overlay using GGeoXml, and that's basically all I want to show. I've also tried to add a blank white KML-layer between the base map and the actual data, but with no luck. Anyone out there who knows how to hide or disable the base map?
In case anyone's having the same issue, I ended up solving it by simply making all the Google-generated map images transparent using jQuery:
jQuery('#map img').css('opacity', '0').css('filter', 'alpha(opacity=0)').css('-moz-opacity', '0').css('-khtml-opacity', '0');
The selector finds all img-tags below the map div id and sets opacity to 0 in most browsers. Left to display on the map is only the KML overlay, which was just what I wanted.