Skip to content

Instantly share code, notes, and snippets.

@comoc
Last active August 29, 2015 14:28
Show Gist options
  • Save comoc/16354d85eff2c337bfbd to your computer and use it in GitHub Desktop.
Save comoc/16354d85eff2c337bfbd to your computer and use it in GitHub Desktop.
Google Maps APIで外部のKMLファイルを表示するときの注意点 ref: http://qiita.com/comocc/items/3fc93859cb3d1955398f
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 11,
center: {lat: 35.681269, lng: 41.876}
});
var ctaLayer = new google.maps.KmlLayer({
url: 'http://localhost/tokyost.kml', // NG
map: map
});
}
https://drive.google.com/file/d/0B9BZNJJL012qTjVWT0FQdlRvbFU/view?usp=sharing
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 11,
center: {lat: 35.681269, lng: 41.876}
});
var ctaLayer = new google.maps.KmlLayer({
url: 'https://drive.google.com/file/d/0B9BZNJJL012qTjVWT0FQdlRvbFU/view?usp=sharing', // NG
map: map
});
}
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 11,
center: {lat: 35.681269, lng: 41.876}
});
var ctaLayer = new google.maps.KmlLayer({
url: 'https://sites.google.com/a/foobarbaz/test/tokyost.kml',
map: map
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment