0
votes

I have already set my Google Maps' Api to accept any referrer and I am still getting a 403 error. The only reason I'm even using the key is because I'm using Fusion Tips (http://gmaps-utility-gis.googlecode.com/svn/trunk/fusiontips/docs/reference.html) so that I can have a mouse-over event (To my understanding Google Maps from Fusion Tables do not support mouse-over events natively, please correct me if I'm wrong). Is it just a fusion tips bug? If anyone could point out to me where I'm going wrong or possible solutions it would be greatly appreciated, thanks.

EDIT - I don't know if it's important but I'm building this locally

Also I've used this Fusion Table elsewhere without any problems, which leads me to believe I have a problem in my Fusion Tips implementations

Code Snippet:

var map;
var layer_1;

function initialize() {
  map = new google.maps.Map(document.getElementById('map-canvas'), {
    center: new google.maps.LatLng(33.205, -97.1325),
    zoom: 11,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  });

  layer_1 = new google.maps.FusionTablesLayer({
    suppressInfoWindows: true,
    query: {
      select: "col0",

      from: "*Fusion Table*",

    },
    map: map,
    styleId: 2,
    templateId: 2
  });

  layer_1.enableMapTips({
    key: "*Google Map Key that already has all referrers allowed*",
    select: "JP_C",
    from: "*Fusion Table",
    geometryColumn: 'geometry',
    delay: 200,
    tolerance: 4
  });

  google.maps.event.addListener(layer_1, 'mouseover', function(fEvent) {
   console.log("mouseover");    
  });

}


google.maps.event.addDomListener(window, 'load', initialize);

Error code:

error, code=403 message=Access Not Configured. The API is not enabled for your project, or there is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your configuration. reason=accessNotConfigured

2
Are downloads enabled from your table? - geocodezip
I'm not sure. I've used the table elsewhere without problem but not with fusion tips. I will check. - mario
Yes, downloads are allowed. - mario

2 Answers

2
votes

The error-message "Access Not Configured" means that your key currently isn't valid for use with the Fusion Tables API. You must enable the Fusion Tables API for the particular project in the developers console.

0
votes

Side note - I ended up not going with Fusion Tips because it didn't function as smoothly as I would have preferred. So instead I ended up going with the more "official" route and followed this Google example - https://developers.google.com/fusiontables/docs/samples/mouseover_map_styles - which basically has you:

  1. Create a map
  2. Call the Fusion Table via a query
  3. Place the callback in the body tag
  4. Has you control how each polygon is drawn as it is drawn (Which is what makes it the winner in my book).

It's more complicated to start out but when you walk through the example and check out how they used it for their own Fusion Table it's not too bad, and the end result is much better IMO. Hope this helps.