tags:

views:

10

answers:

0

How to show no map image when we provide wrong lattitude and longitude values instead of displaying gray color .

The values 100, 100 does not show any address on map . so instead showing empty map i would like to show another image there .

How can we change below code :

<script type="text/javascript">
   function initialize() {
    var latlng = new google.maps.LatLng('100','100');
    var settings = {
     zoom: 15,
     center: latlng,
     mapTypeControl: true,
     mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
     navigationControl: true,
     navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
     mapTypeId: google.maps.MapTypeId.ROADMAP};
    var map = new google.maps.Map(document.getElementById("map_canvas"), settings);
    var contentString = '';
    var infowindow = new google.maps.InfoWindow({
     content: contentString
    });

    var companyPos = new google.maps.LatLng('100', '100');

    var companyMarker = new google.maps.Marker({
     position: companyPos,
     map: map,
     title:"",
     zIndex: 3});

   google.maps.event.addListener(companyMarker, 'click', function() {
     infowindow.open(map,companyMarker);
    });
   }
  </script>

Could any one please provide me solution .

thanks in advance.