OSDN Git Service

Googleマッププラグイン更新。
authornaoki hirata <naoki@magic3.org>
Mon, 27 Feb 2017 12:13:29 +0000 (21:13 +0900)
committernaoki hirata <naoki@magic3.org>
Mon, 27 Feb 2017 12:13:29 +0000 (21:13 +0900)
scripts/ckeditor4.6.2/plugins/googlemaps/plugin.js

index c9199c7..0675e93 100644 (file)
                },
                // 初期起動時、ソースモード切替時に呼び出し
                afterInit: function(editor){
-                       var apiKey = '';
-                       if (typeof(editor.config.googlemapsPlugin) === "undefined" || typeof(editor.config.googlemapsPlugin.apiKey) === "undefined"){
-                               alert(editor.lang.googlemaps.msgApiKeyNotConfigured);
-                       } else {
-                               apiKey = editor.config.googlemapsPlugin.apiKey;
-                       }
-                       
                        // SCRIPTタグのGoogleマップ情報読み込み
                        var div = document.createElement('div');
                        div.innerHTML = editor.getData();
                                                                if (regExp.test(objectId)) mapNumber = RegExp.$1;
                                                                var mapInfo = GoogleMapsHandler.getMap(mapNumber);
                                                                if (mapInfo){
+                                                                       // GoogleマップAPIキーを取得
+                                                                       var apiKey = '';
+                                                                       if (typeof(editor.config.googlemapsPlugin) === "undefined" || typeof(editor.config.googlemapsPlugin.apiKey) === "undefined"){
+                                                                               alert(editor.lang.googlemaps.msgApiKeyNotConfigured);
+                                                                       } else {
+                                                                               apiKey = editor.config.googlemapsPlugin.apiKey;
+                                                                       }
+                                                                       
                                                                        // 幅、高さを設定
                                                                        var width, height, widthType, heightType, alignCenter;
                                                                        var style = element.attributes.style;