Remove/hide default maps layer in google maps and add image overlay - google-maps

So basically what i'm trying to achieve is this functionality in google maps v3,that they have in openlayers: http://dev.openlayers.org/releases/OpenLayers-2.11/examples/image-layer.html
Hide the base layer of googlemaps (the actual map), and then add a image overlay that is placed over the entire surface of the map.
Is this possible? and do anyone have any solutions at hand?

It's called a GroundOverlay: https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay
However, while a GroundOverlay covers the base map, it does not remove it. You'd need a custom map type for that: https://developers.google.com/maps/documentation/javascript/maptypes#CustomMapTypes
It would be fairly easy to develop a custom map type that always returns a blank tile.

Related

Google Maps iOS custom UIView instead of a marker

I'm looking for a way to use a custom UIView (not just a custom image) instead of default marker provided by Google Maps iOS SDK. Basically I need a possibility to place my UIView agains proper coordinates of the map, so not necessarily to use markers as they are, just any suitable solution. Any ideas?
There is not currently a way to do this. You can view the relevent feature request (and star it, to show interest) here: https://code.google.com/p/gmaps-api-issues/issues/detail?id=5203
The marker only shows an image. So it cannot take a CustomView. Moreover, if your custom view has some sort of button on it there is no way you can track the events from those button.
In simple words the map renders the markers as UIImage.

Google Maps v3 block map interaction

I am trying to make a Polyline editor, just like the one from Google Drawings Library. (for specific reasons, i can't use that one)
It works on the same principle. Start with a point, then for each click add new points and make the polyline.
On the editor from Google Drawings Library, while you are editing a polyline, you're mouse can't interact with other items from the map.
Inspecting with firebug, i see that they have an overlay of 20000000 z-index inside the map.
Is there any way of creating the same overlay for my map using default Google Maps functions?
It's a custom overlay inside the overlayMouseTarget-pane with the same size as the map and a draw-method that updates the position of the overlay. You may do the same.

How to scroll map based on Google maps APIs

I want to make Custom Map based on Google maps APIs I am using this code to get the Bitmap image
http://maps.googleapis.com/maps/api/staticmap?zoom=18&maptype=hybrid&size=560x480&markers=loc:26.177001,32.736675&sensor=false
Now I want to scroll the map, How can I do that. in other words I want algorithm to link between coordinates and gotten image size and map zoom
Thanks a lot
You are using Static google maps api. That's mean you will get just a print of the map as an image. This is really useful when you want to show just a place in the map without download the javascript lib.
If you want use the map zoom, scrool and other things you have to use the javascript google maps api

Google map API v3 markers overlapping

I am making an application with google maps.
When markers are overlapping only the last one is displayed even if the icons are different..
I do not want it to cluster in that case, rather it should show both maybe by changing the coordinates just a but??
Any solutions??
I think this is a pretty elegant solution, called Spiderfying the markers.
https://github.com/jawj/OverlappingMarkerSpiderfier
I'm thinking of using it.
What I do now is use JavaScript to make a fancy popup that hides and shows divs on one marker location (created problematically in PHP, but you could do it on JS too). It has the side benefit of allowing less markers on the map.
Click a black numbered marker on this map to see it in action.
http://www.yourmapper.com/map/111/crime-reports/crime-in-metro-louisville-ky-since-jan-2003.htm
Another option is to use Google Maps API 3 Utility Library, it has a Marker Clusterer.

Google Maps and GWT: how to put a text label on a map?

I am using this api
http://gwt-google-apis.googlecode.com/svn/javadoc/maps/1.1/index.html
, the GWT Google Maps API, in my application.
Now I want to render some text on different coordinates on the map. But.... how?
I have googled around, but it seems there isn't a clear solution?
Any ideas if/how it is possible using some sort of JSNI solution?
You can add markers to the map as described in the GWT Maps Getting started Guide:
LatLng cawkerCity = LatLng.newInstance(39.509, -98.434);
map.addOverlay(new Marker(cawkerCity));
If you want to render your text directly on the map, you can extend com.google.gwt.maps.client.overlay.Overlay (to create a text overlay). An example of a custom map overlay can be found at http://timlwhite.typepad.com/blog/2008/08/creating-custom-google-maps-overlays-with-gwt-widgets.html