I have tried to insert the code but don't know how to make it work. It
seems that I get nothing or the original sized markers.
My code does not call for a paticular image file so I guess it is
getting the google default. I also have multiple markers so does this
work globably or does it have to be repeated for each marker

My code is below and here is the expample in the documnetation:
DOCUMENTATION
var image = new google.maps.MarkerImage('images/beachflag.png',
      // This marker is 20 pixels wide by 32 pixels tall.
      new google.maps.Size(20, 32),
      // The origin for this image is 0,0.
      new google.maps.Point(0,0),
      // The anchor for this image is the base of the flagpole at
0,32.
      new google.maps.Point(0, 32));


MYCODE:
<script type="text/javascript" src="http://maps.google.com/maps/api/js?
sensor=false"></script>
<script type="text/javascript">
  var map;
  function initialize() {
    var map_center = new google.maps.LatLng(37.3190500, -119.5564800);
    var store1 = new google.maps.LatLng(37.321664, -119.563259);
    var store2 = new google.maps.LatLng(37.318913, -119.549177);
    var store3 = new google.maps.LatLng(37.318088, -119.550151);
    var store4 = new google.maps.LatLng(37.315256, -119.563599);
        var store5 = new google.maps.LatLng(37.319600, -119.548500);


    var myOptions = {
      zoom: 14,
      center: map_center,
          disableDefaultUI: true,
          navigationControl: false,
      scaleControl: false,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    }
    map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);

    var marker1 = new google.maps.Marker({
        position: store1,
                map: map,
        title:"N1"
    });
    var marker2 = new google.maps.Marker({
        position: store2,
        map: map,
        title:"N2"
    });
    var marker3 = new google.maps.Marker({
        position: store3,
        map: map,
        title:"C1"
    });
    var marker4 = new google.maps.Marker({
        position: store4,
        map: map,
        title:"C2"
        });
    var marker5 = new google.maps.Marker({
        position: store5,
        map: map,
        title:"J1"
    });
    google.maps.event.addListener(marker1, 'click', function() {
      map.set_center(store1);
      map.set_zoom(10);
    });
    google.maps.event.addListener(marker2, 'click', function() {
      map.set_center(store2);
      map.set_zoom(10);
    });
    google.maps.event.addListener(marker3, 'click', function() {
      map.set_center(store3);
      map.set_zoom(10);
    });
    google.maps.event.addListener(marker4, 'click', function() {
      map.set_center(store4);
      map.set_zoom(10);
    });
        google.maps.event.addListener(marker5, 'click', function() {
      map.set_center(store5);
      map.set_zoom(10);
    });
  }
</script>


On Jul 14, 11:57 am, Rossko <[email protected]> wrote:
> > I did not find and documentation or examples to shrink the icons.
>
> The documentaton doesn't mention shrinking, but it does allow you set
> any size you like
>    http://code.google.com/apis/maps/documentation/javascript/overlays.ht...
> Look in the 'complex' example at how MarkerImage is used
>      var image = new google.maps.MarkerImage('images/beachflag.png',
>            // This marker is 20 pixels wide by 32 pixels tall.
>       new google.maps.Size(20, 32),
> ....

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to