Skip to content

Commit

Permalink
serve test
Browse files Browse the repository at this point in the history
  • Loading branch information
masashiGMS committed Aug 23, 2018
1 parent beafc3c commit d7ec0cf
Show file tree
Hide file tree
Showing 20 changed files with 41 additions and 41 deletions.
4 changes: 2 additions & 2 deletions config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
<plugin name="cordova-plugin-ionic-webview" spec="^2.0.2" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
<plugin name="cordova-plugin-googlemaps" spec="/Users/masashi/Documents/workspace2/cordova-plugin-googlemaps">
<variable name="API_KEY_FOR_BROWSER" value="AIzaSyBzTWTKaMEeABaeBSa3_E6ZMxseK4xXl4k" />
<plugin name="cordova-plugin-googlemaps" spec="https://github.com/mapsplugin/cordova-plugin-googlemaps#experimental">
<variable name="API_KEY_FOR_BROWSER" value="AIzaSyBZamoub9SCWL2GriEBRSgLGVVrF0QPakk" />
</plugin>
<engine name="android" spec="^7.1.1" />
<engine name="ios" spec="^4.5.5" />
Expand Down
1 change: 0 additions & 1 deletion docs/1.4e6165a9504297a4b5fc.js

This file was deleted.

1 change: 1 addition & 0 deletions docs/1.e26deaa5d20f241f53be.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="assets/imgs/screen.png" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="API_KEY_FOR_BROWSER" value="AIzaSyBZamoub9SCWL2GriEBRSgLGVVrF0QPakk" />
<preference name="API_KEY_FOR_BROWSER" value="AIzaSyBZamoub9SCWL2GriEBRSgLGVVrF0QPakk" />
</widget>
4 changes: 2 additions & 2 deletions docs/cordova_plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,11 @@ module.exports.metadata =
"com.googlemaps.ios": "2.7.0",
"cordova-plugin-device": "2.0.2",
"cordova-plugin-ionic-keyboard": "2.1.2",
"cordova-plugin-ionic-webview": "2.0.2",
"cordova-plugin-ionic-webview": "2.0.3",
"cordova-plugin-splashscreen": "5.0.2",
"cordova-plugin-statusbar": "2.4.2",
"cordova-plugin-whitelist": "1.3.3",
"cordova-plugin-googlemaps": "2.3.12-ext-20180822-1038"
"cordova-plugin-googlemaps": "2.3.12-ext-20180822-1610"
}
// BOTTOM OF METADATA
});
8 changes: 4 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Ionic App</title>
<title>@ionic-native/google-maps demo</title>

<base href="/" />
<base href="./" />

<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">

<link rel="icon" type="image/png" href="assets/icon/favicon.png">
<link rel="icon" type="image/png" href="assets/imgs/screen.png">

<!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes">
Expand All @@ -19,5 +19,5 @@
<link rel="stylesheet" href="styles.8e2d0868b92e42ab9e24.css"></head>
<body>
<app-root></app-root>
<script type="text/javascript" src="runtime.6897ff8b8ab2f4fc3ef7.js"></script><script type="text/javascript" src="polyfills.c51286684955b9005cee.js"></script><script type="text/javascript" src="cordova.be00a3c9f5babbb22844.js"></script><script type="text/javascript" src="main.a02fa1faee7b85d41f43.js"></script></body>
<script type="text/javascript" src="runtime.1adf239fd9191ee56f20.js"></script><script type="text/javascript" src="polyfills.c51286684955b9005cee.js"></script><script type="text/javascript" src="cordova.be00a3c9f5babbb22844.js"></script><script type="text/javascript" src="main.a02fa1faee7b85d41f43.js"></script></body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ document.addEventListener("load_googlemaps", function() {
//-----------------
// Read XML file
//-----------------
var xhr = createCORSRequest('GET', '/config.xml', true);
var xhr = createCORSRequest('GET', './config.xml', true);
if (xhr) {
xhr.onreadystatechange = function() {
try {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cordova.define("cordova-plugin-googlemaps.PluginKmlOverlay", function(require, exports, module) {
cordova.define("cordova-plugin-googlemaps.PluginKmlOverlay", function(require, exports, module) {
var InlineWorker = require('cordova-plugin-googlemaps.InlineWorker');

function PluginKmlOverlay(pluginMap) {
Expand All @@ -18,6 +18,7 @@ PluginKmlOverlay.prototype._create = function(onSuccess, onError, args) {
//-------------------------------------
var worker = new InlineWorker(loadKml);
worker.onmessage = function(evt) {
console.log('host message', evt.data);
worker.terminate();
onSuccess(evt.data);
};
Expand Down Expand Up @@ -250,6 +251,7 @@ function loadKml(self) {
// merge attributes and child nodes
if (typeof attributes === 'object') {
object = attributes;
object.line=198;
} else {
object = {};
}
Expand All @@ -267,7 +269,8 @@ function loadKml(self) {
if ("string" === typeof child) {
object = {
'tagName': elem.n,
'value': child
'value': child,
'line': 215
};
} else {
object = toObject(child, reviver);
Expand All @@ -276,15 +279,17 @@ function loadKml(self) {
'tagName': elem.n,
'value': {
'children': [object]
}
},
'line': 227
};
}
}
} else {
// the node has no attribute nor child node
object = {
'tagName': elem.n,
'value': ''
'value': '',
'line': 233
};
}

Expand All @@ -309,12 +314,14 @@ function loadKml(self) {
} else {
object.value.children.push({
'tagName': key,
'value': val
'value': val,
'line': 258
});
}
}

return function(text, reviver) {
text = text.replace(/<\?xml[^>]+>/i, "");
var xmlTree = parseXML(text);
var result = toObject(xmlTree, reviver);
result.tagName = "document";
Expand Down Expand Up @@ -495,6 +502,7 @@ function loadKml(self) {
//-----------------
// Read XML file
//-----------------
console.log(params);
var xhr = createCORSRequest('GET', params.url, true);
if (xhr) {
xhr.onreadystatechange = function() {
Expand All @@ -517,8 +525,6 @@ function loadKml(self) {
//-----------------
// Parse it
//-----------------
xmlTxt = xmlTxt.replace(/<\?xml[^>]+>/i, "");
xmlTxt = xmlTxt.replace(/(<!--).*?(-->)/g, "");
var doc = fromXML(xmlTxt);
var parser = new KmlParserClass();
var root = parser.parseXml(doc);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cordova.define("cordova-plugin-googlemaps.PluginMap", function(require, exports, module) {
cordova.define("cordova-plugin-googlemaps.PluginMap", function(require, exports, module) {


var utils = require('cordova/utils'),
Expand Down Expand Up @@ -452,6 +452,8 @@ PluginMap.prototype.setTrafficEnabled = function(onSuccess, onError, args) {

};



PluginMap.prototype.fromLatLngToPoint = function(onSuccess, onError, args) {
var self = this;
var map = self.get("map");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
cordova.define("cordova-plugin-googlemaps.PluginMarker", function(require, exports, module) {


cordova.define("cordova-plugin-googlemaps.PluginMarker", function(require, exports, module) {
var utils = require('cordova/utils'),
event = require('cordova-plugin-googlemaps.event'),
BaseClass = require('cordova-plugin-googlemaps.BaseClass'),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cordova.define("cordova-plugin-googlemaps.PluginStreetViewPanorama", function(require, exports, module) {
cordova.define("cordova-plugin-googlemaps.PluginStreetViewPanorama", function(require, exports, module) {
var utils = require('cordova/utils'),
event = require('cordova-plugin-googlemaps.event'),
BaseClass = require('cordova-plugin-googlemaps.BaseClass'),
Expand Down
3 changes: 0 additions & 3 deletions docs/plugins/cordova-plugin-googlemaps/www/BaseClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ BaseClass.prototype = {
var listeners = this[SUBSCRIPTIONS_FIELD][eventName];
var i = listeners.length;
var args = Array.prototype.slice.call(arguments, 1);
listeners = listeners.filter(function(listener) {
return !!listener;
});

while (i--) {
listeners[i].apply(this, args);
Expand Down
3 changes: 2 additions & 1 deletion docs/plugins/cordova-plugin-googlemaps/www/HtmlInfoWindow.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cordova.define("cordova-plugin-googlemaps.HtmlInfoWindow", function(require, exports, module) {
cordova.define("cordova-plugin-googlemaps.HtmlInfoWindow", function(require, exports, module) {
var utils = require('cordova/utils'),
event = require('./event'),
common = require('./Common'),
Expand Down Expand Up @@ -337,6 +337,7 @@ var HTMLInfoWindow = function () {
};

self._hook.on(self, "infoPosition_changed", function (ignore, point) {
if (!point) return;
var x = point.x + self.get("offsetX");
var y = point.y + self.get("offsetY");
anchorDiv.style['-webkit-transform'] = "translate3d(" + x + "px, " + y + "px, 0px)";
Expand Down
5 changes: 2 additions & 3 deletions docs/plugins/cordova-plugin-googlemaps/www/KmlLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ KmlLoader.prototype.parseKmlFile = function(callback) {
var self = this;

self.exec.call(self.map, function(kmlData) {
// debug
// console.log(JSON.parse(JSON.stringify(kmlData)));

var rawKmlData = JSON.parse(JSON.stringify(kmlData));
Object.defineProperty(self, "kmlStyles", {
value: kmlData.styles,
writable: false
Expand All @@ -84,6 +82,7 @@ KmlLoader.prototype.parseKmlFile = function(callback) {
return !!overlay;
});
var result = placeMarkOverlays.shift();
//result.set('kmlData', rawKmlData);
callback.call(self, self.camera, result);
});
}, self.map.errorHandler, self.map.id, 'loadPlugin', ['KmlOverlay', {
Expand Down
4 changes: 1 addition & 3 deletions docs/plugins/cordova-plugin-googlemaps/www/KmlOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,7 @@ var KmlOverlay = function(map, kmlId, camera, kmlData, kmlOverlayOptions) {
styles = parseBalloonStyle(overlay.get("balloonstyle"));
}
styles = styles || {};
if (cordova.platformId !== 'browser') {
styles.overflow = "scroll";
}
styles.overflow = "scroll";
styles["max-width"] = (map.getDiv().offsetWidth * 0.8) + "px";
styles["max-height"] = (map.getDiv().offsetHeight * 0.6) + "px";

Expand Down
3 changes: 1 addition & 2 deletions docs/plugins/cordova-plugin-googlemaps/www/Map.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cordova.define("cordova-plugin-googlemaps.Map", function(require, exports, module) {
cordova.define("cordova-plugin-googlemaps.Map", function(require, exports, module) {
var utils = require('cordova/utils'),
cordova_exec = require('cordova/exec'),
common = require('./Common'),
Expand Down Expand Up @@ -1019,7 +1019,6 @@ Map.prototype.addKmlOverlay = function(kmlOverlayOptions, callback) {
};



//-------------
// Ground overlay
//-------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cordova.define("cordova-plugin-googlemaps.js_CordovaGoogleMaps", function(require, exports, module) {
cordova.define("cordova-plugin-googlemaps.js_CordovaGoogleMaps", function(require, exports, module) {

var utils = require('cordova/utils'),
common = require('cordova-plugin-googlemaps.Common'),
Expand Down
Loading

0 comments on commit d7ec0cf

Please sign in to comment.