How to make markers larger in google street view - google-maps

I was wondering how/if it was possible to make marker icons appear larger than the default in google maps street view. (they currently show up really small/hard to see.)
Thanks.

You need to use a larger icon (pixel-wise) and also set the size of the icon and/or scaledSize via the MarkerImage class.
Here is a quick and dirty example:
http://jsfiddle.net/AdnGH/
Here is the relevant documentation:
http://code.google.com/apis/maps/documentation/javascript/reference.html#MarkerImage

Related

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

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.

How do I add a high-resolution custom marker on a static google map

I'm using Google static maps (documention here) to show shops' locations, and I'm using a custom marker instead of the default.
However, this marker image appears low-resolution on high-resolution mobiles like the iPhone 4.
How do I fix it?
Set &markers=scale:2 in conjunction with a #2x marker icon image and the &scale=2 parameter.
I just answered this in a duplicate question here: https://stackoverflow.com/a/17130379/378638
In order to avoid the low-resolution dithering, you need to use proportionately larger custom marker images. See the example below, which references a 64x64 pushpin:
http://maps.googleapis.com/maps/api/staticmap?size=480x480&markers=icon:http://maps.google.com/mapfiles/kml/pushpin/grn-pushpin.png%7C224+West+20th+Street+NY%7C75+9th+Ave+NY%7C700+E+9th+St+NY&sensor=false

Google maps markers are hidden behind each other

I have a problem with markers hidden behind other markers.
The problem occurs when the addresses are too close to each other. e.g. street 20, street 22.
Changing zIndex will not help, because that is just "stacking".
How can I "float" the markers so that they are all visible on the map?
I recommend you look into marker clustering.
http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/examples/advanced_example.html
UPDATE:
Google now support marker cluserting via a native library: https://developers.google.com/maps/documentation/javascript/marker-clustering
is this any use to you - it's called 'Spiderfier':
http://blog.mackerron.com/2011/06/22/overlapping-marker-spiderfier/
https://github.com/jawj/OverlappingMarkerSpiderfier
It might help to use smaller markers. When I had this problem, I changed the size of my marker images from 20x34 px down to 20x20 px.
So,you can use mysql spatial extensions and MBRContains(RectangleAroundYourPoint,GeometryColumnOfYourTable)
-if of course your table have a geometry column which is easy(upon creation you choose i.e. point as the column type,and when performing an insertion you have to do it with GeomFromText)-
to check if another place exist within that rectangle and if it is move the newcoming place until the mbrcontains return false or something like that.
Hope it helps
I use marker clusterer and had the same problem. I add a small random number to coordinates. I do not want to change the locations of markers so much therefore in satellite mode problem still exists but in map mode we can zoom much more.
This may not be a good solution but good enough for my application.

Google Maps default zoom level

I created a public map using my Google Map. I want to set a default zoom level, but it is not saved. Is this possible?
Also, is it possible to change the list of place markers?
the reference map that you supply (quebec summer festival) is called by the URL: http://maps.google.com/maps/ms?source=embed&hl=en&geocode=&ie=UTF8&msa=0&msid=112492115201367239282.0004609e0fcc239c4f792&ll=46.81084,-71.217113&spn=0.02056,0.038624&z=15
notice that the last parameter "&z=15" defines the zoom level (in the embed map code, "&z=15" becomes "& a m p ; z = 1 5" [remove spaces between letters]). if you change this you can increase or decrease the zoom level. if you suppress the zoom level, googlemaps will automatically calculate a zoom level when displaying said map. NORMALLY this leaves some of your map outside the frame.
so, just by supplying the URL with the desired zoomlevel you have solved your problem. this works very well with static maps. if you have a dynamically generated map (from a database, for example), the fastest solution is to put 2 markers (top left and bottom right corners) slightly outside your boundary box. this will force automatic zoom in the desired amount (hopefully).
Not using API just made a map points using my GMail account and made it public, like the following site:
http://maps.google.com/maps/ms?source=embed&hl=en&geocode=&ie=UTF8&msa=0&msid=112492115201367239282.0004609e0fcc239c4f792&ll=46.81084,-71.217113&spn=0.02056,0.038624&z=15
Nothing is saved by a web page. HTML browsing is stateless. If you want to save some information you will need to use similar trick as any other web applications. E.g. putting it in cookie and the setting the zoom level using the information in the cookie when you initial the page.

How can I have a smooth animated move between 2 Google Maps locations?

When clicking from one marker to another in Google Maps, the map screen animates the move smoothly if both markers are within them initial map view but jumps if one of the markers is off screen.
I'm trying to set up a map which has several locations within the main map area but has one which is 'off screen'. I have a signpost icon to the more distant location within the initial map area which I want to smoothly scroll to the off screen location when clicked (so as to give a better sense of it's relative location). I can't find anything in the Maps API which would let me do this however.
I could zoom out, move and then zoom in again but this looks a bit jarring. Am I missing something in the API, or does anyone have any suggestions?
Unfortunately, I don't think this is possible (without a change from Google). From the v3 API reference for panTo:
Changes the center of the map to the given LatLng. If the change is less than both the width and height of the map, the transition will be smoothly animated.
which implies that if that change is not less than the dimensions of the map, the transition won't be smoothly animated. The other pan methods are similar.
You could try moving in multiple steps but that's a bit of a hack and I suspect the result will be poor.
Sorry that's not very helpful (I have the same problem).
For me this method works, but i'm using Google Maps API v2.
LatLng latLng = new LatLng(lat,lng);
map.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, ZOOM_FACTOR));
This animates the camera from current position to the new one.
If you are using Gmaps API V2, then you can implement smooth animated move very easily by using panBy() method. You have to use fromLatLngToContainerPixel() method to find the amount of pixels to pan by.
Here is the bit of code:
var newLoc = map.fromLatLngToContainerPixel(new GLatLng(lat, lng));
map.panBy(new GSize( newLoc.x, newLoc.y ));
However, what I am trying to do is to achieve the same thing in maps API V3, but sadly fromLatLngToContainerPixel() method does not work anymore the way it did :(