0

I use fusiontables for getting geolocation and make all country on google maps clickable. When a user clicks on any country they get popup with the name of that country. But problem is, some country is not highlighted for click event like Malta, Lichtenstein etc. Is there any way to custom fix this? This is part of my code but you can find all on jsfiddle

 map.setOptions({styles: styles});

// Initialize JSONP request
var script = document.createElement('script');
var url = ['https://www.googleapis.com/fusiontables/v1/query?'];
url.push('sql=');
var query = 'SELECT name, kml_4326 FROM ' +
    '1foc3xO9DyfSIF6ofvN0kp2bxSfSeKog5FbdWdQ';
var encodedQuery = encodeURIComponent(query);
url.push(encodedQuery);
url.push('&callback=drawMap');
url.push('&key=AIzaSyAm9yWCV7JPCTHCJut8whOjARd7pwROFDQ');
script.src = url.join('');
var body = document.getElementsByTagName('body')[0];
body.appendChild(script);
}

And also, Is there a better way to accurately label the polygon? That does not exactly match the polygon marks and the real borders of the states

6
  • Downvotes do not relate to your character or intelligence, they usually mean "This question does not show any research effort; it is unclear or not useful." (By the way, I did not downvote.)
    – Yunnosch
    Jan 15, 2018 at 18:32
  • @yunnosch ofcourse... but if he give me downvote he need to explain me what i do wrong. Ppl need to know, many of us is not native english speaker and we mabey have problem when try to explain in english, but we try to give a best
    – Arter
    Jan 15, 2018 at 18:41
  • No, downvotes (and upvotes) are anonymous on purpose. Downvotes are good for StackOverflow purposes, even if a few of them are mood-related more than competence-related. So in order to get people to (down-)vote, the danger of revenge has been removed. So if anybody does comment on a downvote, be grateful and admire the courage. Downvoting without a comment is accepted. I say this with some deep downvote-scars...
    – Yunnosch
    Jan 15, 2018 at 18:44
  • Ok thnx. Can you mabey help me with answer on my question? Because I need to make fix for this tomorow. Thnx
    – Arter
    Jan 15, 2018 at 18:47
  • 1
    Those countries are not clickable because they don't exist in the fusion table, can't you just add the country and proper information to the fusion table? Jan 16, 2018 at 11:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.