Jump to content

[SOLVED] jQuery map showing 403 forbidden eror


Recommended Posts

Hi,

 

I am doing a small module in prestashop. I have loaded http://gmap3.net/ in backend to show the store map to admin. My code for jquery is like this

 

   


jQuery(document).ready(function() {
      jQuery('#storemap').blur(function() {
        //console.log('hello');
        $("#test").gmap3({
      marker:{
        latLng: [46.578498,2.457275],
        options:{
          draggable:true
        },
        events:{
          dragend: function(marker){
            $(this).gmap3({
              getaddress:{
                latLng:marker.getPosition(),
                callback:function(results){
                  var map = $(this).gmap3("get"),
                    infowindow = $(this).gmap3({get:"infowindow"}),
                    content = results && results[1] ? results && results[1].formatted_address : "no address";
                  if (infowindow){
                    infowindow.open(map, marker);
                    infowindow.setContent(content);
                  } else {
                    $(this).gmap3({
                      infowindow:{
                        anchor:marker, 
                        options:{content: content}
                      }
                    });
                  }
                }
              }
            });
          }
        }
      },
      map:{
        options:{
          zoom: 5
        }
      }
    });
        });
    });

 

and after all when I saw console tab it showed me an error like this


I want to tell you that it was working perfectely fine before 2 days. When I saw it today it is showing the 403 forbiden error. Can someone kindly tell me what's the issue here? Any help and suggestions will be really appreciable. Thanks

 

Link to comment
Share on other sites

where is the script to include url that you mentioned above? can you show it?


if you try to open this url you will see this:

 

The Google Maps API server rejected your request. The Google Maps JavaScript API must be downloaded directly from Google's servers. The Google Maps JavaScript API must be downloaded directly from Google's servers. Please see <a href="https://developers.google.com/maps/documentation/javascript/tutorial#Loading_the_Maps_API">instructions here</a>. Learn more: https://developers.google.com/maps/documentation/javascript/tutorial#Loading_the_Maps_API

Link to comment
Share on other sites

×
×
  • Create New...