Take the 2-minute tour ×

I have implemented google map in my project . I've set all the required things . I was wondering the control icons not appearing like pan,zoom etc. But still I can zoom ,pan with clicking on a blurred shape instead of the picture buttons . Anybody can address the issue ? .Sorry for my bad english

<script src="//maps.google.com/maps?file=api&amp;v=2&amp;key=key"
    <script type="text/javascript">

    function initialize() {
      if (GBrowserIsCompatible()) {
        var latlng = new GLatLng(<?php echo $lattitude?>, <?php echo $longitude?>);
        map.setCenter(latlng, 13);

        var iconRed = new GIcon(); 
        iconRed.image = 'http://labs.google.com/ridefinder/images/mm_20_red.png';
        iconRed.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
        iconRed.iconSize = new GSize(12, 20);
        iconRed.shadowSize = new GSize(22, 20);
        iconRed.iconAnchor = new GPoint(6, 20);
        iconRed.infoWindowAnchor = new GPoint(5, 1);

          map.addControl(new GSmallMapControl());
          map.addControl(new GMapTypeControl());
          map.addOverlay(new GMarker(latlng));

          var name = "name";
          var address = "address";
          var type = "bar";
          var point = latlng;
          var marker = createMarker(point, name, address, iconRed);

    function createMarker(point, name, address, iconRed) {
      var marker = new GMarker(point, iconRed);
      GEvent.addListener(marker, 'click', function() {
      return marker;
share|improve this question
What is your code? –  hakre Feb 13 '12 at 11:49
yes, please post your code.. also which version of the API and which implementation.. js, php? –  gorelative Feb 13 '12 at 13:08
A screenshot would be helpful too –  Lightness Races in Orbit Feb 13 '12 at 13:11
@Mike I've pasted the code . I am using js API –  duke Feb 13 '12 at 13:12
Not an answer, simply a comment.. why aren't you using v3 of the API. I cant see anything wrong with that code without seeing it in action. Only thing i could suggest is to troubleshoot it by removing all the extra stuff. Define a single marker, with no custom icons or html. –  gorelative Feb 13 '12 at 13:18
show 2 more comments

1 Answer

up vote 1 down vote accepted

You should not be using V2 of the Google Maps API for your app. That version of the API has been deprecated.

Instead you shoule be using V3:


share|improve this answer
Anyway I changed v to 3 .Now it seems working fine. Thanks all –  duke Feb 14 '12 at 4:45
add comment

Your Answer


