diff options
Diffstat (limited to 'protected/extensions/egmap/assets')
| -rw-r--r-- | protected/extensions/egmap/assets/geoxml3.js | 1018 | ||||
| -rw-r--r-- | protected/extensions/egmap/assets/infobox_packed.js | 1 | ||||
| -rw-r--r-- | protected/extensions/egmap/assets/keydragzoom_packed.js | 1 | ||||
| -rw-r--r-- | protected/extensions/egmap/assets/latloncontrol.js | 81 | ||||
| -rw-r--r-- | protected/extensions/egmap/assets/markerclusterer_packed.js | 1 | ||||
| -rw-r--r-- | protected/extensions/egmap/assets/markers/m1.png | bin | 0 -> 3003 bytes | |||
| -rw-r--r-- | protected/extensions/egmap/assets/markers/m2.png | bin | 0 -> 3259 bytes | |||
| -rw-r--r-- | protected/extensions/egmap/assets/markers/m3.png | bin | 0 -> 3956 bytes | |||
| -rw-r--r-- | protected/extensions/egmap/assets/markers/m4.png | bin | 0 -> 5705 bytes | |||
| -rw-r--r-- | protected/extensions/egmap/assets/markers/m5.png | bin | 0 -> 6839 bytes | |||
| -rw-r--r-- | protected/extensions/egmap/assets/markerwithlabel_packed.js | 1 |
11 files changed, 1103 insertions, 0 deletions
diff --git a/protected/extensions/egmap/assets/geoxml3.js b/protected/extensions/egmap/assets/geoxml3.js new file mode 100644 index 0000000..58b4cd1 --- /dev/null +++ b/protected/extensions/egmap/assets/geoxml3.js @@ -0,0 +1,1018 @@ +/* + geoxml3.js + + Renders KML on the Google Maps JavaScript API Version 3 + http://code.google.com/p/geoxml3/ + + Copyright 2010 Sterling Udell, Larry Ross + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*/ + +// Extend the global String object with a method to remove leading and trailing whitespace +if (!String.prototype.trim) { + String.prototype.trim = function () { + return this.replace(/^\s+|\s+$/g, ''); + }; +} + +// Declare namespace +geoXML3 = window.geoXML3 || {instances: []}; + +// Constructor for the root KML parser object +geoXML3.parser = function (options) { + // Private variables + var parserOptions = geoXML3.combineOptions(options, { + singleInfoWindow: false, + processStyles: true, + zoom: true + }); + var docs = []; // Individual KML documents + var lastPlacemark; + var parserName; + if (!parserOptions.infoWindow && parserOptions.singleInfoWindow) + parserOptions.infoWindow = new google.maps.InfoWindow(); + // Private methods + + var parse = function (urls, docSet) { + // Process one or more KML documents + if (!parserName) { + parserName = 'geoXML3.instances[' + (geoXML3.instances.push(this) - 1) + ']'; + } + + if (typeof urls === 'string') { + // Single KML document + urls = [urls]; + } + + // Internal values for the set of documents as a whole + var internals = { + parser: this, + docSet: docSet || [], + remaining: urls.length, + parseOnly: !(parserOptions.afterParse || parserOptions.processStyles) + }; + var thisDoc, j; + for (var i = 0; i < urls.length; i++) { + var baseUrl = urls[i].split('?')[0]; + for (j = 0; j < docs.length; j++) { + if (baseUrl === docs[j].baseUrl) { + // Reloading an existing document + thisDoc = docs[j]; + thisDoc.url = urls[i]; + thisDoc.internals = internals; + thisDoc.reload = true; + docs.splice(j, 1); + break; + } + } + thisDoc = thisDoc || { + url: urls[i], + baseUrl: baseUrl, + internals: internals + }; + internals.docSet.push(thisDoc); + geoXML3.fetchXML(thisDoc.url, function (responseXML) {render(responseXML, thisDoc);}); + } + }; + + var hideDocument = function (doc) { + if (!doc) doc = docs[0]; + // Hide the map objects associated with a document + var i; + if (!!doc.markers) { + for (i = 0; i < doc.markers.length; i++) { + if(!!doc.markers[i].infoWindow) doc.markers[i].infoWindow.close(); + doc.markers[i].setVisible(false); + } + } + if (!!doc.ggroundoverlays) { + for (i = 0; i < doc.ggroundoverlays.length; i++) { + doc.ggroundoverlays[i].setOpacity(0); + } + } + if (!!doc.gpolylines) { + for (i=0;i<doc.gpolylines.length;i++) { + doc.gpolylines[i].setMap(null); + } + } + if (!!doc.gpolygons) { + for (i=0;i<doc.gpolygons.length;i++) { + doc.gpolygons[i].setMap(null); + } + } + }; + + var showDocument = function (doc) { + if (!doc) doc = docs[0]; + // Show the map objects associated with a document + var i; + if (!!doc.markers) { + for (i = 0; i < doc.markers.length; i++) { + doc.markers[i].setVisible(true); + } + } + if (!!doc.ggroundoverlays) { + for (i = 0; i < doc.ggroundoverlays.length; i++) { + doc.ggroundoverlays[i].setOpacity(doc.ggroundoverlays[i].percentOpacity_); + } + } + if (!!doc.gpolylines) { + for (i=0;i<doc.gpolylines.length;i++) { + doc.gpolylines[i].setMap(parserOptions.map); + } + } + if (!!doc.gpolygons) { + for (i=0;i<doc.gpolygons.length;i++) { + doc.gpolygons[i].setMap(parserOptions.map); + } + } + }; + +function processStyle(thisNode, styles, styleID) { + var nodeValue = geoXML3.nodeValue; + var defaultStyle = { + color: "ff000000", // black + width: 1, + fill: true, + outline: true, + fillcolor: "3fff0000" // blue + }; + styles[styleID] = styles[styleID] || defaultStyle; + var styleNodes = thisNode.getElementsByTagName('Icon'); + if (!!styleNodes && !!styleNodes.length && (styleNodes.length > 0)) { + styles[styleID] = { + href: nodeValue(styleNodes[0].getElementsByTagName('href')[0]), + scale: nodeValue(styleNodes[0].getElementsByTagName('scale')[0]) + }; + if (!isNaN(styles[styleID].scale)) styles[styleID].scale = 1.0; + } + styleNodes = thisNode.getElementsByTagName('LineStyle'); + if (!!styleNodes && !!styleNodes.length && (styleNodes.length > 0)) { + styles[styleID].color = nodeValue(styleNodes[0].getElementsByTagName('color')[0]), + styles[styleID].width = nodeValue(styleNodes[0].getElementsByTagName('width')[0]) + } + styleNodes = thisNode.getElementsByTagName('PolyStyle'); + if (!!styleNodes && !!styleNodes.length && (styleNodes.length > 0)) { + styles[styleID].outline = getBooleanValue(styleNodes[0].getElementsByTagName('outline')[0]); + styles[styleID].fill = getBooleanValue(styleNodes[0].getElementsByTagName('fill')[0]); + styles[styleID].fillcolor = nodeValue(styleNodes[0].getElementsByTagName('color')[0]); + } + return styles[styleID]; +} + +function getBooleanValue(node) { + var nodeContents = geoXML3.nodeValue(node); + if (!nodeContents) return true; + if (nodeContents) nodeContents = parseInt(nodeContents); + if (isNaN(nodeContents)) return true; + if (nodeContents == 0) return false; + else return true; +} + +function processPlacemarkCoords(node, tag) { + var parent = node.getElementsByTagName(tag); +var coordListA = []; + for (var i=0; i<parent.length; i++) { + var coordNodes = parent[i].getElementsByTagName('coordinates') + if (!coordNodes) { + if (coordListA.length > 0) { + break; + } else { + return [{coordinates: []}]; + } + } + + for (var j=0; j<coordNodes.length;j++) { + var coords = geoXML3.nodeValue(coordNodes[j]).trim(); + coords = coords.replace(/,\s+/g, ','); + var path = coords.split(/\s+/g); + var pathLength = path.length; + var coordList = []; + for (var k = 0; k < pathLength; k++) { + coords = path[k].split(','); + coordList.push({ + lat: parseFloat(coords[1]), + lng: parseFloat(coords[0]), + alt: parseFloat(coords[2]) + }); + } + coordListA.push({coordinates: coordList}); + } +} + return coordListA; +} + + var render = function (responseXML, doc) { + // Callback for retrieving a KML document: parse the KML and display it on the map + if (!responseXML) { + // Error retrieving the data + geoXML3.log('Unable to retrieve ' + doc.url); + if (parserOptions.failedParse) { + parserOptions.failedParse(doc); + } + } else if (!doc) { + throw 'geoXML3 internal error: render called with null document'; + } else { //no errors + var i; + var styles = {}; + doc.placemarks = []; + doc.groundoverlays = []; + doc.ggroundoverlays = []; + doc.networkLinks = []; + doc.gpolygons = []; + doc.gpolylines = []; + + // Declare some helper functions in local scope for better performance + var nodeValue = geoXML3.nodeValue; + + // Parse styles + var styleID, styleNodes; + nodes = responseXML.getElementsByTagName('Style'); + nodeCount = nodes.length; + for (i = 0; i < nodeCount; i++) { + thisNode = nodes[i]; + var thisNodeId = thisNode.getAttribute('id'); + if (!!thisNodeId) { + styleID = '#' + thisNodeId; + processStyle(thisNode, styles, styleID); + } + } + doc.styles = styles; + if (!!parserOptions.processStyles || !parserOptions.createMarker) { + // Convert parsed styles into GMaps equivalents + processStyles(doc); + } + + // Parse placemarks + if (!!doc.reload && !!doc.markers) { + for (i = 0; i < doc.markers.length; i++) { + doc.markers[i].active = false; + } + } + var placemark, node, coords, path, marker, poly; + var placemark, coords, path, pathLength, marker, polygonNodes, coordList; + var placemarkNodes = responseXML.getElementsByTagName('Placemark'); + for (pm = 0; pm < placemarkNodes.length; pm++) { + // Init the placemark object + node = placemarkNodes[pm]; + placemark = { + name: geoXML3.nodeValue(node.getElementsByTagName('name')[0]), + description: geoXML3.nodeValue(node.getElementsByTagName('description')[0]), + styleUrl: geoXML3.nodeValue(node.getElementsByTagName('styleUrl')[0]) + }; + var defaultStyle = { + color: "ff000000", // black + width: 1, + fill: true, + outline: true, + fillcolor: "3fff0000" // blue + }; + placemark.style = doc.styles[placemark.styleUrl] || defaultStyle; + // inline style overrides shared style + var inlineStyles = node.getElementsByTagName('Style'); + if (inlineStyles && (inlineStyles.length > 0)) { + var style = processStyle(node,doc.styles,"inline"); + processStyleID(style); + if (style) placemark.style = style; + } + if (/^https?:\/\//.test(placemark.description)) { + placemark.description = ['<a href="', placemark.description, '">', placemark.description, '</a>'].join(''); + } + + // process MultiGeometry + var GeometryNodes = node.getElementsByTagName('coordinates'); + var Geometry = null; + if (!!GeometryNodes && (GeometryNodes.length > 0)) { + for (var gn=0;gn<GeometryNodes.length;gn++) { + if (!GeometryNodes[gn].parentNode || + !GeometryNodes[gn].parentNode.nodeName) { + + } else { // parentNode.nodeName exists + var GeometryPN = GeometryNodes[gn].parentNode; + Geometry = GeometryPN.nodeName; + + // Extract the coordinates + // What sort of placemark? + switch(Geometry) { + case "Point": + placemark.Point = processPlacemarkCoords(node, "Point")[0]; + placemark.latlng = new google.maps.LatLng(placemark.Point.coordinates[0].lat, placemark.Point.coordinates[0].lng); + pathLength = 1; + break; + case "LinearRing": + // Polygon/line + polygonNodes = node.getElementsByTagName('Polygon'); + // Polygon + if (!placemark.Polygon) + placemark.Polygon = [{ + outerBoundaryIs: {coordinates: []}, + innerBoundaryIs: [{coordinates: []}] + }]; + for (var pg=0;pg<polygonNodes.length;pg++) { + placemark.Polygon[pg] = { + outerBoundaryIs: {coordinates: []}, + innerBoundaryIs: [{coordinates: []}] + } + placemark.Polygon[pg].outerBoundaryIs = processPlacemarkCoords(polygonNodes[pg], "outerBoundaryIs"); + placemark.Polygon[pg].innerBoundaryIs = processPlacemarkCoords(polygonNodes[pg], "innerBoundaryIs"); + } + coordList = placemark.Polygon[0].outerBoundaryIs; + break; + + case "LineString": + pathLength = 0; + placemark.LineString = processPlacemarkCoords(node,"LineString"); + break; + + default: + break; + } + } // parentNode.nodeName exists + } // GeometryNodes loop + } // if GeometryNodes + // call the custom placemark parse function if it is defined + if (!!parserOptions.pmParseFn) parserOptions.pmParseFn(node, placemark); + doc.placemarks.push(placemark); + + if (placemark.Point) { + if (parserOptions.zoom && !!google.maps) { + doc.bounds = doc.bounds || new google.maps.LatLngBounds(); + doc.bounds.extend(placemark.latlng); + } + + if (!!parserOptions.createMarker) { + // User-defined marker handler + parserOptions.createMarker(placemark, doc); + } else { // !user defined createMarker + // Check to see if this marker was created on a previous load of this document + var found = false; + if (!!doc) { + doc.markers = doc.markers || []; + if (doc.reload) { + for (var j = 0; j < doc.markers.length; j++) { + if (doc.markers[j].getPosition().equals(placemark.latlng)) { + found = doc.markers[j].active = true; + break; + } + } + } + } + + if (!found) { + // Call the built-in marker creator + marker = createMarker(placemark, doc); + marker.active = true; + } + } + } + if (placemark.Polygon) { // poly test 2 + if (!!doc) { + doc.gpolygons = doc.gpolygons || []; + } + + if (!!parserOptions.createPolygon) { + // User-defined polygon handler + poly = parserOptions.createPolygon(placemark, doc); + } else { // ! user defined createPolygon + // Check to see if this marker was created on a previous load of this document + poly = createPolygon(placemark,doc); + poly.active = true; + } + if (parserOptions.zoom && !!google.maps) { + doc.bounds = doc.bounds || new google.maps.LatLngBounds(); + doc.bounds.union(poly.bounds); + } + } + if (placemark.LineString) { // polyline + if (!!doc) { + doc.gpolylines = doc.gpolylines || []; + } + if (!!parserOptions.createPolyline) { + // User-defined polyline handler + poly = parserOptions.createPolyline(placemark, doc); + } else { // ! user defined createPolyline + // Check to see if this marker was created on a previous load of this document + poly = createPolyline(placemark,doc); + poly.active = true; + } + if (parserOptions.zoom && !!google.maps) { + doc.bounds = doc.bounds || new google.maps.LatLngBounds(); + doc.bounds.union(poly.bounds); + } + } + + } // placemark loop + + if (!!doc.reload && !!doc.markers) { + for (i = doc.markers.length - 1; i >= 0 ; i--) { + if (!doc.markers[i].active) { + if (!!doc.markers[i].infoWindow) { + doc.markers[i].infoWindow.close(); + } + doc.markers[i].setMap(null); + doc.markers.splice(i, 1); + } + } + } + + // Parse ground overlays + if (!!doc.reload && !!doc.groundoverlays) { + for (i = 0; i < doc.groundoverlays.length; i++) { + doc.groundoverlays[i].active = false; + } + } + + if (!!doc) { + doc.groundoverlays = doc.groundoverlays || []; + } + // doc.groundoverlays =[]; + var groundOverlay, color, transparency, overlay; + var groundNodes = responseXML.getElementsByTagName('GroundOverlay'); + for (i = 0; i < groundNodes.length; i++) { + node = groundNodes[i]; + + // Init the ground overlay object + groundOverlay = { + name: geoXML3.nodeValue(node.getElementsByTagName('name')[0]), + description: geoXML3.nodeValue(node.getElementsByTagName('description')[0]), + icon: {href: geoXML3.nodeValue(node.getElementsByTagName('href')[0])}, + latLonBox: { + north: parseFloat(geoXML3.nodeValue(node.getElementsByTagName('north')[0])), + east: parseFloat(geoXML3.nodeValue(node.getElementsByTagName('east')[0])), + south: parseFloat(geoXML3.nodeValue(node.getElementsByTagName('south')[0])), + west: parseFloat(geoXML3.nodeValue(node.getElementsByTagName('west')[0])) + } + }; + if (parserOptions.zoom && !!google.maps) { + doc.bounds = doc.bounds || new google.maps.LatLngBounds(); + doc.bounds.union(new google.maps.LatLngBounds( + new google.maps.LatLng(groundOverlay.latLonBox.south, groundOverlay.latLonBox.west), + new google.maps.LatLng(groundOverlay.latLonBox.north, groundOverlay.latLonBox.east) + )); + } + + // Opacity is encoded in the color node + var colorNode = node.getElementsByTagName('color'); + if ( colorNode && colorNode.length && (colorNode.length > 0)) { + groundOverlay.opacity = geoXML3.getOpacity(nodeValue(colorNode[0])); + } else { + groundOverlay.opacity = 0.45; + } + + doc.groundoverlays.push(groundOverlay); + + if (!!parserOptions.createOverlay) { + // User-defined overlay handler + parserOptions.createOverlay(groundOverlay, doc); + } else { // ! user defined createOverlay + // Check to see if this overlay was created on a previous load of this document + var found = false; + if (!!doc) { + doc.groundoverlays = doc.groundoverlays || []; + if (doc.reload) { + overlayBounds = new google.maps.LatLngBounds( + new google.maps.LatLng(groundOverlay.latLonBox.south, groundOverlay.latLonBox.west), + new google.maps.LatLng(groundOverlay.latLonBox.north, groundOverlay.latLonBox.east)); + var overlays = doc.groundoverlays; + for (i = overlays.length; i--;) { + if ((overlays[i].bounds().equals(overlayBounds)) && + (overlays.url_ === groundOverlay.icon.href)) { + found = overlays[i].active = true; + break; + } + } + } + } + + if (!found) { + // Call the built-in overlay creator + overlay = createOverlay(groundOverlay, doc); + overlay.active = true; + } + } + if (!!doc.reload && !!doc.groundoverlays && !!doc.groundoverlays.length) { + var overlays = doc.groundoverlays; + for (i = overlays.length; i--;) { + if (!overlays[i].active) { + overlays[i].remove(); + overlays.splice(i, 1); + } + } + doc.groundoverlays = overlays; + } + } + // Parse network links + var networkLink; + var docPath = document.location.pathname.split('/'); + docPath = docPath.splice(0, docPath.length - 1).join('/'); + var linkNodes = responseXML.getElementsByTagName('NetworkLink'); + for (i = 0; i < linkNodes.length; i++) { + node = linkNodes[i]; + + // Init the network link object + networkLink = { + name: geoXML3.nodeValue(node.getElementsByTagName('name')[0]), + link: { + href: geoXML3.nodeValue(node.getElementsByTagName('href')[0]), + refreshMode: geoXML3.nodeValue(node.getElementsByTagName('refreshMode')[0]) + } + }; + + // Establish the specific refresh mode + if (networkLink.link.refreshMode === '') { + networkLink.link.refreshMode = 'onChange'; + } + if (networkLink.link.refreshMode === 'onInterval') { + networkLink.link.refreshInterval = parseFloat(geoXML3.nodeValue(node.getElementsByTagName('refreshInterval')[0])); + if (isNaN(networkLink.link.refreshInterval)) { + networkLink.link.refreshInterval = 0; + } + } else if (networkLink.link.refreshMode === 'onChange') { + networkLink.link.viewRefreshMode = geoXML3.nodeValue(node.getElementsByTagName('viewRefreshMode')[0]); + if (networkLink.link.viewRefreshMode === '') { + networkLink.link.viewRefreshMode = 'never'; + } + if (networkLink.link.viewRefreshMode === 'onStop') { + networkLink.link.viewRefreshTime = geoXML3.nodeValue(node.getElementsByTagName('refreshMode')[0]); + networkLink.link.viewFormat = geoXML3.nodeValue(node.getElementsByTagName('refreshMode')[0]); + if (networkLink.link.viewFormat === '') { + networkLink.link.viewFormat = 'BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]'; + } + } + } + + if (!/^[\/|http]/.test(networkLink.link.href)) { + // Fully-qualify the HREF + networkLink.link.href = docPath + '/' + networkLink.link.href; + } + + // Apply the link + if ((networkLink.link.refreshMode === 'onInterval') && + (networkLink.link.refreshInterval > 0)) { + // Reload at regular intervals + setInterval(parserName + '.parse("' + networkLink.link.href + '")', + 1000 * networkLink.link.refreshInterval); + } else if (networkLink.link.refreshMode === 'onChange') { + if (networkLink.link.viewRefreshMode === 'never') { + // Load the link just once + doc.internals.parser.parse(networkLink.link.href, doc.internals.docSet); + } else if (networkLink.link.viewRefreshMode === 'onStop') { + // Reload when the map view changes + + } + } + } +} + + if (!!doc.bounds) { + doc.internals.bounds = doc.internals.bounds || new google.maps.LatLngBounds(); + doc.internals.bounds.union(doc.bounds); + } + if (!!doc.markers || !!doc.groundoverlays || !!doc.gpolylines || !!doc.gpolygons) { + doc.internals.parseOnly = false; + } + + doc.internals.remaining -= 1; + if (doc.internals.remaining === 0) { + // We're done processing this set of KML documents + // Options that get invoked after parsing completes + if (!!doc.internals.bounds) { + parserOptions.map.fitBounds(doc.internals.bounds); + } + if (parserOptions.afterParse) { + parserOptions.afterParse(doc.internals.docSet); + } + + if (!doc.internals.parseOnly) { + // geoXML3 is not being used only as a real-time parser, so keep the processed documents around + for (var i=(doc.internals.docSet.length-1);i>=0;i--) { + docs.push(doc.internals.docSet[i]); + } + } + } + }; + +var kmlColor = function (kmlIn) { + var kmlColor = {}; + if (kmlIn) { + aa = kmlIn.substr(0,2); + bb = kmlIn.substr(2,2); + gg = kmlIn.substr(4,2); + rr = kmlIn.substr(6,2); + kmlColor.color = "#" + rr + gg + bb; + kmlColor.opacity = parseInt(aa,16)/256; + } else { + // defaults + kmlColor.color = randomColor(); + kmlColor.opacity = 0.45; + } + return kmlColor; +} + +var randomColor = function(){ + var color="#"; + var colorNum = Math.random()*8388607.0; // 8388607 = Math.pow(2,23)-1 + var colorStr = colorNum.toString(16); + color += colorStr.substring(0,colorStr.indexOf('.')); + return color; +}; + + var processStyleID = function (style) { + var zeroPoint = new google.maps.Point(0,0); + if (!!style.href) { + var markerRegEx = /\/(red|blue|green|yellow|lightblue|purple|pink|orange|pause|go|stop)(-dot)?\.png/; + if (markerRegEx.test(style.href)) { + //bottom middle + var anchorPoint = new google.maps.Point(16*style.scale, 32*style.scale); + } else { + var anchorPoint = new google.maps.Point(16*style.scale, 12*style.scale); + } + // Init the style object with a standard KML icon + style.icon = new google.maps.MarkerImage( + style.href, + new google.maps.Size(32*style.scale, 32*style.scale), + zeroPoint, + // bottom middle + anchorPoint, + new google.maps.Size(32,32) + + ); + + // Look for a predictable shadow + var stdRegEx = /\/(red|blue|green|yellow|lightblue|purple|pink|orange)(-dot)?\.png/; + var shadowSize = new google.maps.Size(59, 32); + var shadowPoint = new google.maps.Point(16,32); + if (stdRegEx.test(style.href)) { + // A standard GMap-style marker icon + style.shadow = new google.maps.MarkerImage( + 'http://maps.google.com/mapfiles/ms/micons/msmarker.shadow.png', + shadowSize, + zeroPoint, + shadowPoint); + } else if (style.href.indexOf('-pushpin.png') > -1) { + // Pushpin marker icon + style.shadow = new google.maps.MarkerImage( + 'http://maps.google.com/mapfiles/ms/micons/pushpin_shadow.png', + shadowSize, + zeroPoint, + shadowPoint); + } else { + // Other MyMaps KML standard icon + style.shadow = new google.maps.MarkerImage( + style.href.replace('.png', '.shadow.png'), + shadowSize, + zeroPoint, + shadowPoint); + } + } + } + + var processStyles = function (doc) { + for (var styleID in doc.styles) { + processStyleID(doc.styles[styleID]); + } + }; + + var createMarker = function (placemark, doc) { + // create a Marker to the map from a placemark KML object + + // Load basic marker properties + var markerOptions = geoXML3.combineOptions(parserOptions.markerOptions, { + map: parserOptions.map, + position: new google.maps.LatLng(placemark.Point.coordinates[0].lat, placemark.Point.coordinates[0].lng), + title: placemark.name, + zIndex: Math.round(placemark.Point.coordinates[0].lat * -100000)<<5, + icon: placemark.style.icon, + shadow: placemark.style.shadow + }); + + // Create the marker on the map + var marker = new google.maps.Marker(markerOptions); + if (!!doc) { + doc.markers.push(marker); + } + + // Set up and create the infowindow + var infoWindowOptions = geoXML3.combineOptions(parserOptions.infoWindowOptions, { + content: '<div class="geoxml3_infowindow"><h3>' + placemark.name + + '</h3><div>' + placemark.description + '</div></div>', + pixelOffset: new google.maps.Size(0, 2) + }); + if (parserOptions.infoWindow) { + marker.infoWindow = parserOptions.infoWindow; + } else { + marker.infoWindow = new google.maps.InfoWindow(infoWindowOptions); + } + // Infowindow-opening event handler + google.maps.event.addListener(marker, 'click', function() { + marker.infoWindow.setOptions(infoWindowOptions); + this.infoWindow.open(this.map, this); + }); + placemark.marker = marker; + return marker; + }; + + var createOverlay = function (groundOverlay, doc) { + // Add a ProjectedOverlay to the map from a groundOverlay KML object + + if (!window.ProjectedOverlay) { + throw 'geoXML3 error: ProjectedOverlay not found while rendering GroundOverlay from KML'; + } + + var bounds = new google.maps.LatLngBounds( + new google.maps.LatLng(groundOverlay.latLonBox.south, groundOverlay.latLonBox.west), + new google.maps.LatLng(groundOverlay.latLonBox.north, groundOverlay.latLonBox.east) + ); + var overlayOptions = geoXML3.combineOptions(parserOptions.overlayOptions, {percentOpacity: groundOverlay.opacity*100}); + var overlay = new ProjectedOverlay(parserOptions.map, groundOverlay.icon.href, bounds, overlayOptions); + + if (!!doc) { + doc.ggroundoverlays = doc.ggroundoverlays || []; + doc.ggroundoverlays.push(overlay); + } + + return overlay; + }; + +// Create Polyline + + var createPolyline = function(placemark, doc) { + var path = []; + for (var j=0; j<placemark.LineString.length; j++) { + var coords = placemark.LineString[j].coordinates; + var bounds = new google.maps.LatLngBounds(); + for (var i=0;i<coords.length;i++) { + var pt = new google.maps.LatLng(coords[i].lat, coords[i].lng); + path.push(pt); + bounds.extend(pt); + } + } + // point to open the infowindow if triggered + var point = path[Math.floor(path.length/2)]; + // Load basic polyline properties + var kmlStrokeColor = kmlColor(placemark.style.color); + var polyOptions = geoXML3.combineOptions(parserOptions.polylineOptions, { + map: parserOptions.map, + path: path, + strokeColor: kmlStrokeColor.color, + strokeWeight: placemark.style.width, + strokeOpacity: kmlStrokeColor.opacity, + title: placemark.name + }); + var infoWindowOptions = geoXML3.combineOptions(parserOptions.infoWindowOptions, { + content: '<div class="geoxml3_infowindow"><h3>' + placemark.name + + '</h3><div>' + placemark.description + '</div></div>', + pixelOffset: new google.maps.Size(0, 2) + }); + var p = new google.maps.Polyline(polyOptions); + p.bounds = bounds; + if (parserOptions.infoWindow) { + p.infoWindow = parserOptions.infoWindow; + } else { + p.infoWindow = new google.maps.InfoWindow(infoWindowOptions); + } + // Infowindow-opening event handler + google.maps.event.addListener(p, 'click', function(e) { + p.infoWindow.setOptions(infoWindowOptions); + if (e && e.latLng) { + p.infoWindow.setPosition(e.latLng); + } else { + p.infoWindow.setPosition(point); + } + p.infoWindow.open(this.map); + }); + if (!!doc) doc.gpolylines.push(p); + placemark.polyline = p; + return p; +} + +// Create Polygon + +var createPolygon = function(placemark, doc) { + var bounds = new google.maps.LatLngBounds(); + var pathsLength = 0; + var paths = []; + for (var polygonPart=0;polygonPart<placemark.Polygon.length;polygonPart++) { + for (var j=0; j<placemark.Polygon[polygonPart].outerBoundaryIs.length; j++) { + var coords = placemark.Polygon[polygonPart].outerBoundaryIs[j].coordinates; + var path = []; + for (var i=0;i<coords.length;i++) { + var pt = new google.maps.LatLng(coords[i].lat, coords[i].lng); + path.push(pt); + bounds.extend(pt); + } + paths.push(path); + pathsLength += path.length; + } + for (var j=0; j<placemark.Polygon[polygonPart].innerBoundaryIs.length; j++) { + var coords = placemark.Polygon[polygonPart].innerBoundaryIs[j].coordinates; + var path = []; + for (var i=0;i<coords.length;i++) { + var pt = new google.maps.LatLng(coords[i].lat, coords[i].lng); + path.push(pt); + bounds.extend(pt); + } + paths.push(path); + pathsLength += path.length; + } + } + + // Load basic polygon properties + var kmlStrokeColor = kmlColor(placemark.style.color); + var kmlFillColor = kmlColor(placemark.style.fillcolor); + if (!placemark.style.fill) kmlFillColor.opacity = 0.0; + var strokeWeight = placemark.style.width; + if (!placemark.style.outline) { + strokeWeight = 0; + kmlStrokeColor.opacity = 0.0; + } + var polyOptions = geoXML3.combineOptions(parserOptions.polygonOptions, { + map: parserOptions.map, + paths: paths, + title: placemark.name, + strokeColor: kmlStrokeColor.color, + strokeWeight: strokeWeight, + strokeOpacity: kmlStrokeColor.opacity, + fillColor: kmlFillColor.color, + fillOpacity: kmlFillColor.opacity + }); + + var infoWindowOptions = geoXML3.combineOptions(parserOptions.infoWindowOptions, { + content: '<div class="geoxml3_infowindow"><h3>' + placemark.name + + '</h3><div>' + placemark.description + '</div></div>', + pixelOffset: new google.maps.Size(0, 2) + }); + var p = new google.maps.Polygon(polyOptions); + p.bounds = bounds; + if (parserOptions.infoWindow) { + p.infoWindow = parserOptions.infoWindow; + } else { + p.infoWindow = new google.maps.InfoWindow(infoWindowOptions); + } + // Infowindow-opening event handler + google.maps.event.addListener(p, 'click', function(e) { + p.infoWindow.setOptions(infoWindowOptions); + if (e && e.latLng) { + p.infoWindow.setPosition(e.latLng); + } else { + p.infoWindow.setPosition(p.bounds.getCenter()); + } + p.infoWindow.open(this.map); + }); + if (!!doc) doc.gpolygons.push(p); + placemark.polygon = p; + return p; +} + + return { + // Expose some properties and methods + + options: parserOptions, + docs: docs, + + parse: parse, + hideDocument: hideDocument, + showDocument: showDocument, + processStyles: processStyles, + createMarker: createMarker, + createOverlay: createOverlay, + createPolyline: createPolyline, + createPolygon: createPolygon + }; +}; +// End of KML Parser + +// Helper objects and functions +geoXML3.getOpacity = function (kmlColor) { + // Extract opacity encoded in a KML color value. Returns a number between 0 and 1. + if (!!kmlColor && + (kmlColor !== '') && + (kmlColor.length == 8)) { + var transparency = parseInt(kmlColor.substr(0, 2), 16); + return transparency / 255; + } else { + return 1; + } +}; + +// Log a message to the debugging console, if one exists +geoXML3.log = function(msg) { + if (!!window.console) { + console.log(msg); + } else { alert("log:"+msg); } +}; + +// Combine two options objects: a set of default values and a set of override values +geoXML3.combineOptions = function (overrides, defaults) { + var result = {}; + if (!!overrides) { + for (var prop in overrides) { + if (overrides.hasOwnProperty(prop)) { + result[prop] = overrides[prop]; + } + } + } + if (!!defaults) { + for (prop in defaults) { + if (defaults.hasOwnProperty(prop) && (result[prop] === undefined)) { + result[prop] = defaults[prop]; + } + } + } + return result; +}; + +// Retrieve an XML document from url and pass it to callback as a DOM document +geoXML3.fetchers = []; + +// parse text to XML doc +/** + * Parses the given XML string and returns the parsed document in a + * DOM data structure. This function will return an empty DOM node if + * XML parsing is not supported in this browser. + * @param {string} str XML string. + * @return {Element|Document} DOM. + */ +geoXML3.xmlParse = function (str) { + if (typeof ActiveXObject != 'undefined' && typeof GetObject != 'undefined') { + var doc = new ActiveXObject('Microsoft.XMLDOM'); + doc.loadXML(str); + return doc; + } + + if (typeof DOMParser != 'undefined') { + return (new DOMParser()).parseFromString(str, 'text/xml'); + } + + return createElement('div', null); +} + +geoXML3.fetchXML = function (url, callback) { + function timeoutHandler() { + callback(); + }; + + var xhrFetcher; + if (!!geoXML3.fetchers.length) { + xhrFetcher = geoXML3.fetchers.pop(); + } else { + if (!!window.XMLHttpRequest) { + xhrFetcher = new window.XMLHttpRequest(); // Most browsers + } else if (!!window.ActiveXObject) { + xhrFetcher = new window.ActiveXObject('Microsoft.XMLHTTP'); // Some IE + } + } + + if (!xhrFetcher) { + geoXML3.log('Unable to create XHR object'); + callback(null); + } else { + xhrFetcher.open('GET', url, true); + xhrFetcher.onreadystatechange = function () { + if (xhrFetcher.readyState === 4) { + // Retrieval complete + if (!!geoXML3.xhrtimeout) + clearTimeout(geoXML3.xhrtimeout); + if (xhrFetcher.status >= 400) { + geoXML3.log('HTTP error ' + xhrFetcher.status + ' retrieving ' + url); + callback(); + } else { + // Returned successfully + callback(geoXML3.xmlParse(xhrFetcher.responseText)); + } + // We're done with this fetcher object + geoXML3.fetchers.push(xhrFetcher); + } + }; + geoXML3.xhrtimeout = setTimeout(timeoutHandler, 60000); + xhrFetcher.send(null); + } +}; + +//nodeValue: Extract the text value of a DOM node, with leading and trailing whitespace trimmed +geoXML3.nodeValue = function(node) { + var retStr=""; + if (!node) { + return ''; + } + if(node.nodeType==3||node.nodeType==4||node.nodeType==2){ + retStr+=node.nodeValue; + }else if(node.nodeType==1||node.nodeType==9||node.nodeType==11){ + for(var i=0;i<node.childNodes.length;++i){ + retStr+=arguments.callee(node.childNodes[i]); + } + } + return retStr; +};
\ No newline at end of file diff --git a/protected/extensions/egmap/assets/infobox_packed.js b/protected/extensions/egmap/assets/infobox_packed.js new file mode 100644 index 0000000..d621e26 --- /dev/null +++ b/protected/extensions/egmap/assets/infobox_packed.js @@ -0,0 +1 @@ +eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7 p(a){a=a||{};5.8.1N.2h(2,32);2.L=a.1u||"";2.1D=a.1q||H;2.P=a.1H||0;2.E=a.1B||1f 5.8.1U(0,0);2.B=a.W||1f 5.8.2t(0,0);2.S=a.11||q;2.1n=a.1l||"28";2.1k=a.D||{};2.1G=a.1E||"34";2.M=a.19||"2W://2Q.5.2L/2I/2G/2F/1v.2z";3(a.19===""){2.M=""}2.1i=a.1r||1f 5.8.1U(1,1);2.Y=a.1s||H;2.1a=a.1p||H;2.1K=a.2k||"2g";2.17=a.1m||H;2.4=q;2.w=q;2.X=q;2.16=q;2.15=q;2.13=q;2.12=q;2.O=q}p.r=1f 5.8.1N();p.r.22=7(){6 a;6 d=2;6 c=7(e){e.1Z=U;3(e.18){e.18()}};6 b=7(e){e.2S=H;3(e.1Y){e.1Y()}3(!d.17){c(e)}};3(!2.4){2.4=1g.2K("2J");2.1d();3(t 2.L.1w==="u"){2.4.J=2.F()+2.L}v{2.4.J=2.F();2.4.1b(2.L)}2.2y()[2.1K].1b(2.4);2.1F();3(2.4.9.A){2.O=U}v{3(2.P!==0&&2.4.Z>2.P){2.4.9.A=2.P;2.4.9.2u="2s";2.O=U}v{a=2.24();2.4.9.A=(2.4.Z-a.14-a.T)+"R";2.O=H}}2.1t(2.1D);3(!2.17){2.X=5.8.s.I(2.4,"2n",c);2.16=5.8.s.I(2.4,"1L",c);2.15=5.8.s.I(2.4,"2m",c);2.1o=5.8.s.I(2.4,"2l",7(e){2.9.1J="2j"})}2.12=5.8.s.I(2.4,"2i",b);5.8.s.Q(2,"2f")}};p.r.F=7(){6 a="";3(2.M!==""){a="<2e";a+=" 2d=\'"+2.M+"\'";a+=" 2c=T";a+=" 9=\'";a+=" W: 2b;";a+=" 1J: 2a;";a+=" 29: "+2.1G+";";a+="\'>"}N a};p.r.1F=7(){6 a;3(2.M!==""){a=2.4.27;2.w=5.8.s.I(a,\'1L\',2.1I())}v{2.w=q}};p.r.1I=7(){6 a=2;N 7(e){e.1Z=U;3(e.18){e.18()}a.1v();5.8.s.Q(a,"26")}};p.r.1t=7(d){6 m;6 n;6 e=0,G=0;3(!d){m=2.25();3(m 39 5.8.38){3(!m.23().37(2.B)){m.36(2.B)}n=m.23();6 a=m.35();6 h=a.Z;6 f=a.21;6 k=2.E.A;6 l=2.E.1j;6 g=2.4.Z;6 b=2.4.21;6 i=2.1i.A;6 j=2.1i.1j;6 o=2.20().31(2.B);3(o.x<(-k+i)){e=o.x+k-i}v 3((o.x+g+k+i)>h){e=o.x+g+k+i-h}3(2.1a){3(o.y<(-l+j+b)){G=o.y+l-j-b}v 3((o.y+l+j)>f){G=o.y+l+j-f}}v{3(o.y<(-l+j)){G=o.y+l-j}v 3((o.y+b+l+j)>f){G=o.y+b+l+j-f}}3(!(e===0&&G===0)){6 c=m.30();m.2Z(e,G)}}}};p.r.1d=7(){6 i,D;3(2.4){2.4.2Y=2.1n;2.4.9.2X="";D=2.1k;2V(i 2U D){3(D.2R(i)){2.4.9[i]=D[i]}}3(t 2.4.9.1h!=="u"&&2.4.9.1h!==""){2.4.9.2P="2O(1h="+(2.4.9.1h*2N)+")"}2.4.9.W="2M";2.4.9.V=\'1y\';3(2.S!==q){2.4.9.11=2.S}}};p.r.24=7(){6 c;6 a={1e:0,1c:0,14:0,T:0};6 b=2.4;3(1g.1x&&1g.1x.1V){c=b.2H.1x.1V(b,"");3(c){a.1e=C(c.1T,10)||0;a.1c=C(c.1S,10)||0;a.14=C(c.1R,10)||0;a.T=C(c.1W,10)||0}}v 3(1g.2E.K){3(b.K){a.1e=C(b.K.1T,10)||0;a.1c=C(b.K.1S,10)||0;a.14=C(b.K.1R,10)||0;a.T=C(b.K.1W,10)||0}}N a};p.r.2D=7(){3(2.4){2.4.2C.2B(2.4);2.4=q}};p.r.1A=7(){2.22();6 a=2.20().2A(2.B);2.4.9.14=(a.x+2.E.A)+"R";3(2.1a){2.4.9.1c=-(a.y+2.E.1j)+"R"}v{2.4.9.1e=(a.y+2.E.1j)+"R"}3(2.Y){2.4.9.V=\'1y\'}v{2.4.9.V="1X"}};p.r.2T=7(a){3(t a.1l!=="u"){2.1n=a.1l;2.1d()}3(t a.D!=="u"){2.1k=a.D;2.1d()}3(t a.1u!=="u"){2.1Q(a.1u)}3(t a.1q!=="u"){2.1D=a.1q}3(t a.1H!=="u"){2.P=a.1H}3(t a.1B!=="u"){2.E=a.1B}3(t a.1p!=="u"){2.1a=a.1p}3(t a.W!=="u"){2.1z(a.W)}3(t a.11!=="u"){2.1P(a.11)}3(t a.1E!=="u"){2.1G=a.1E}3(t a.19!=="u"){2.M=a.19}3(t a.1r!=="u"){2.1i=a.1r}3(t a.1s!=="u"){2.Y=a.1s}3(t a.1m!=="u"){2.17=a.1m}3(2.4){2.1A()}};p.r.1Q=7(a){2.L=a;3(2.4){3(2.w){5.8.s.z(2.w);2.w=q}3(!2.O){2.4.9.A=""}3(t a.1w==="u"){2.4.J=2.F()+a}v{2.4.J=2.F();2.4.1b(a)}3(!2.O){2.4.9.A=2.4.Z+"R";3(t a.1w==="u"){2.4.J=2.F()+a}v{2.4.J=2.F();2.4.1b(a)}}2.1F()}5.8.s.Q(2,"2x")};p.r.1z=7(a){2.B=a;3(2.4){2.1A()}5.8.s.Q(2,"1O")};p.r.1P=7(a){2.S=a;3(2.4){2.4.9.11=a}5.8.s.Q(2,"2w")};p.r.2v=7(){N 2.L};p.r.1C=7(){N 2.B};p.r.33=7(){N 2.S};p.r.2r=7(){2.Y=H;3(2.4){2.4.9.V="1X"}};p.r.2q=7(){2.Y=U;3(2.4){2.4.9.V="1y"}};p.r.2p=7(c,b){6 a=2;3(b){2.B=b.1C();2.13=5.8.s.2o(b,"1O",7(){a.1z(2.1C())})}2.1M(c);3(2.4){2.1t()}};p.r.1v=7(){3(2.w){5.8.s.z(2.w);2.w=q}3(2.X){5.8.s.z(2.X);5.8.s.z(2.16);5.8.s.z(2.15);5.8.s.z(2.1o);2.X=q;2.16=q;2.15=q;2.1o=q}3(2.13){5.8.s.z(2.13);2.13=q}3(2.12){5.8.s.z(2.12);2.12=q}2.1M(q)};',62,196,'||this|if|div_|google|var|function|maps|style||||||||||||||||InfoBox|null|prototype|event|typeof|undefined|else|closeListener_|||removeListener|width|position_|parseInt|boxStyle|pixelOffset_|getCloseBoxImg_|yOffset|false|addDomListener|innerHTML|currentStyle|content_|closeBoxURL_|return|fixedWidthSet_|maxWidth_|trigger|px|zIndex_|right|true|visibility|position|eventListener1_|isHidden_|offsetWidth||zIndex|contextListener_|moveListener_|left|eventListener3_|eventListener2_|enableEventPropagation_|stopPropagation|closeBoxURL|alignBottom_|appendChild|bottom|setBoxStyle_|top|new|document|opacity|infoBoxClearance_|height|boxStyle_|boxClass|enableEventPropagation|boxClass_|eventListener4_|alignBottom|disableAutoPan|infoBoxClearance|isHidden|panBox_|content|close|nodeType|defaultView|hidden|setPosition|draw|pixelOffset|getPosition|disableAutoPan_|closeBoxMargin|addClickHandler_|closeBoxMargin_|maxWidth|getCloseClickHandler_|cursor|pane_|click|setMap|OverlayView|position_changed|setZIndex|setContent|borderLeftWidth|borderBottomWidth|borderTopWidth|Size|getComputedStyle|borderRightWidth|visible|preventDefault|cancelBubble|getProjection|offsetHeight|createInfoBoxDiv_|getBounds|getBoxWidths_|getMap|closeclick|firstChild|infoBox|margin|pointer|relative|align|src|img|domready|floatPane|apply|contextmenu|default|pane|mouseover|dblclick|mousedown|addListener|open|hide|show|auto|LatLng|overflow|getContent|zindex_changed|content_changed|getPanes|gif|fromLatLngToDivPixel|removeChild|parentNode|onRemove|documentElement|mapfiles|en_us|ownerDocument|intl|div|createElement|com|absolute|100|alpha|filter|www|hasOwnProperty|returnValue|setOptions|in|for|http|cssText|className|panBy|getCenter|fromLatLngToContainerPixel|arguments|getZIndex|2px|getDiv|setCenter|contains|Map|instanceof'.split('|'),0,{}))
\ No newline at end of file diff --git a/protected/extensions/egmap/assets/keydragzoom_packed.js b/protected/extensions/egmap/assets/keydragzoom_packed.js new file mode 100644 index 0000000..e5c184c --- /dev/null +++ b/protected/extensions/egmap/assets/keydragzoom_packed.js @@ -0,0 +1 @@ +eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(B(){9 u=B(a){9 b;2t(a){1t"4h":b="3V";1w;1t"3z":b="2r";1w;1t"3f":b="37";1w;2Y:b=a}N b};9 t=B(h){9 b;9 a={};A(H.1F&&H.1F.1A){b=h.3s.1F.1A(h,"");A(b){a.F=O(b.2o,10)||0;a.1m=O(b.2h,10)||0;a.C=O(b.2Q,10)||0;a.1n=O(b.2M,10)||0;N a}}1f A(H.1x.1y){A(h.1y){a.F=O(u(h.1y.2o),10)||0;a.1m=O(u(h.1y.2h),10)||0;a.C=O(u(h.1y.2Q),10)||0;a.1n=O(u(h.1y.2M),10)||0;N a}}a.F=O(h.7["1I-F-G"],10)||0;a.1m=O(h.7["1I-1m-G"],10)||0;a.C=O(h.7["1I-C-G"],10)||0;a.1n=O(h.7["1I-1n-G"],10)||0;N a};9 v={x:0,y:0};9 s=B(e){v.x=(1i H.1x.1P!=="1r"?H.1x.1P:H.24.1P);v.y=(1i H.1x.1N!=="1r"?H.1x.1N:H.24.1N)};s();9 q=B(e){9 a=0,1L=0;e=e||1R.J;A(1i e.2n!=="1r"){a=e.2n;1L=e.36}1f A(1i e.2F!=="1r"){a=e.2F+v.x;1L=e.31+v.y}N{C:a,F:1L}};9 n=B(h){9 e=h.2k;9 g=h.2g;9 b=h.2K;4f(b!==S){A(b!==H.24&&b!==H.1x){e-=b.1P;g-=b.1N}9 m=b;9 f=m.2k;9 a=m.2g;A(!f&&!a&&1R.1A){9 d=H.1F.1A(m,S).40||H.1F.1A(m,S).3Z;A(d){A(1i d==="3X"){9 c=d.3S(",");f+=O(c[4],10)||0;a+=O(c[5],10)||0}}}e+=f;g+=a;b=b.2K}N{C:e,F:g}};9 o=B(a,b){A(a&&b){1b(9 x 3L b){A(b.3J(x)){a[x]=b[x]}}}N a};9 r=B(h,a){A(1i a!=="1r"){h.7.1u=a}A(1i h.7.1u!=="1r"&&h.7.1u!==""){h.7.3I="3E(1u="+(h.7.1u*3C)+")"}};B R(a,d){9 b=6;9 c=15 E.D.3w();c.3u=B(){b.2v(a,d)};c.3q=B(){};c.3p=B(){};c.2u(a);6.1C=c}R.P.2v=B(a,c){9 i;9 b=6;6.L=a;c=c||{};6.14=c.3j||"1M";6.14=6.14.3h();6.T=t(6.L.13());6.8=[];1b(i=0;i<4;i++){6.8[i]=H.1O("22");6.8[i].3a=B(){N X};o(6.8[i].7,{27:"34",1u:0.25,2A:"32"});o(6.8[i].7,c.30);o(6.8[i].7,c.2Z);o(6.8[i].7,{1K:"21",2j:"2i",W:"1c"});A(6.14==="1M"){6.8[i].7.2W="1c"}r(6.8[i]);A(6.8[i].7.27==="2V"){6.8[i].7.27="2T";r(6.8[i],0)}6.L.13().2f(6.8[i])}6.1z=c.4c||X;6.2P=c.49||"";6.1Y=c.45||E.D.44.42;6.1X=c.41||15 E.D.2L(35,0);6.2e=c.3Y||S;6.2J=c.3W||"3U://D.3T.3R/3Q/3P/1W/3O.3N";6.Y=c.3M||15 E.D.2L(20,20);6.12=c.3K||{};6.12.1l=6.12.1l||"2H 1G 29 2E 2D";6.12.1G=6.12.1G||"2H 1l 29 2E 2D";6.I=H.1O("22");o(6.I.7,{1I:"2r 3H #3G"});o(6.I.7,c.3D);o(6.I.7,{1K:"21",W:"1c"});r(6.I);6.L.13().2f(6.I);6.1d=t(6.I);6.28=[E.D.J.19(H,"3B",B(e){b.2z(e)}),E.D.J.19(H,"3A",B(e){b.1U(e)}),E.D.J.19(6.8[0],"1E",B(e){b.1B(e)}),E.D.J.19(6.8[1],"1E",B(e){b.1B(e)}),E.D.J.19(6.8[2],"1E",B(e){b.1B(e)}),E.D.J.19(6.8[3],"1E",B(e){b.1B(e)}),E.D.J.19(H,"1E",B(e){b.2y(e)}),E.D.J.19(H,"3v",B(e){b.1T(e)}),E.D.J.19(H,"3t",B(e){b.2x(e)}),E.D.J.19(1R,"3r",s)];6.Z=X;6.1Q=X;6.1h=X;6.V=S;6.11=S;6.1p=S;6.1a=S;6.26=S;6.1j=S;A(6.1z){6.K=6.2s(6.1X);A(6.2e!==S){6.K.3o=6.2e}6.L.1W[6.1Y].3n(6.K);6.2q=6.L.1W[6.1Y].1e-1}};R.P.2s=B(a){9 b;9 c;9 d=6;b=H.1O("22");b.3l=6.2P;b.7.1K="3k";b.7.2j="2i";b.7.M=6.Y.M+"w";b.7.G=6.Y.G+"w";b.1q=6.12.1l;c=H.1O("3i");c.3g=6.2J;c.7.1K="21";c.7.C=-(6.Y.G*2)+"w";c.7.F=0+"w";b.2f(c);b.3m=B(e){d.Z=!d.Z;A(d.Z){d.K.1v.7.C=-(d.Y.G*0)+"w";d.K.1q=d.12.1G;d.23=1g;E.D.J.1k(d,"2p")}1f{d.K.1v.7.C=-(d.Y.G*2)+"w";d.K.1q=d.12.1l;E.D.J.1k(d,"2w")}d.1T(e)};b.3e=B(){d.K.1v.7.C=-(d.Y.G*1)+"w"};b.3d=B(){A(d.Z){d.K.1v.7.C=-(d.Y.G*0)+"w";d.K.1q=d.12.1G}1f{d.K.1v.7.C=-(d.Y.G*2)+"w";d.K.1q=d.12.1l}};b.3c=B(){N X};o(b.7,{2A:"3b",3x:a.M+"w",3y:a.G+"w"});N b};R.P.1S=B(e){9 a;e=e||1R.J;a=(e.39&&6.14==="1M")||(e.38&&6.14==="2G")||(e.33&&6.14==="2m");A(!a){2t(e.3F){1t 16:A(6.14==="1M"){a=1g}1w;1t 17:A(6.14==="2m"){a=1g}1w;1t 18:A(6.14==="2G"){a=1g}1w}}N a};R.P.2C=B(){9 c=6.26;A(c){9 b=6.1j;9 a=6.L.13();N c.C>b.C&&c.C<(b.C+a.2B)&&c.F>b.F&&c.F<(b.F+a.2l)}1f{N X}};R.P.2d=B(){9 i;A(6.L&&6.Z&&6.2C()){9 d=6.L.13();6.1p=d.2B-(6.T.C+6.T.1n);6.1a=d.2l-(6.T.F+6.T.1m);A(6.23){9 a=O(6.K.7.C,10)+6.1X.G;9 b=O(6.K.7.F,10)+6.1X.M;9 c=6.Y.G;9 e=6.Y.M;6.8[0].7.F="U";6.8[0].7.C="U";6.8[0].7.G=a+"w";6.8[0].7.M=6.1a+"w";6.8[1].7.F="U";6.8[1].7.C=(a+c)+"w";6.8[1].7.G=(6.1p-(a+c))+"w";6.8[1].7.M=6.1a+"w";6.8[2].7.F="U";6.8[2].7.C=a+"w";6.8[2].7.G=c+"w";6.8[2].7.M=b+"w";6.8[3].7.F=(b+e)+"w";6.8[3].7.C=a+"w";6.8[3].7.G=c+"w";6.8[3].7.M=(6.1a-(b+e))+"w";1b(i=0;i<6.8.1e;i++){6.8[i].7.W="2a"}}1f{6.8[0].7.C="U";6.8[0].7.F="U";6.8[0].7.G=6.1p+"w";6.8[0].7.M=6.1a+"w";1b(i=1;i<6.8.1e;i++){6.8[i].7.G="U";6.8[i].7.M="U"}1b(i=0;i<6.8.1e;i++){6.8[i].7.W="2a"}}}1f{1b(i=0;i<6.8.1e;i++){6.8[i].7.W="1c"}}};R.P.2z=B(e){A(6.L&&!6.Z&&6.1S(e)){6.1j=n(6.L.13());6.Z=1g;6.23=X;6.2d();E.D.J.1k(6,"2p")}A(6.1z&&6.1S(e)){6.K.7.W="1c"}};R.P.1H=B(e){9 a=q(e);9 p=15 E.D.1D();p.x=a.C-6.1j.C-6.T.C;p.y=a.F-6.1j.F-6.T.F;p.x=Q.1s(p.x,6.1p);p.y=Q.1s(p.y,6.1a);p.x=Q.1V(p.x,0);p.y=Q.1V(p.y,0);N p};R.P.1B=B(e){A(6.L&&6.Z){6.1j=n(6.L.13());6.1h=1g;6.V=6.11=6.1H(e);6.I.7.G=6.I.7.M="U";9 a=6.1C.2b();9 b=a.2c(6.V);A(6.1z){6.K.7.W="1c"}E.D.J.1k(6,"2X",b)}};R.P.2y=B(e){6.1Q=1g};R.P.1T=B(e){6.26=q(e);A(6.1h){6.11=6.1H(e);9 c=Q.1s(6.V.x,6.11.x);9 b=Q.1s(6.V.y,6.11.y);9 f=Q.1o(6.V.x-6.11.x);9 g=Q.1o(6.V.y-6.11.y);9 d=Q.1V(0,f-(6.1d.C+6.1d.1n));9 a=Q.1V(0,g-(6.1d.F+6.1d.1m));6.8[0].7.F="U";6.8[0].7.C="U";6.8[0].7.G=c+"w";6.8[0].7.M=6.1a+"w";6.8[1].7.F="U";6.8[1].7.C=(c+f)+"w";6.8[1].7.G=(6.1p-(c+f))+"w";6.8[1].7.M=6.1a+"w";6.8[2].7.F="U";6.8[2].7.C=c+"w";6.8[2].7.G=f+"w";6.8[2].7.M=b+"w";6.8[3].7.F=(b+g)+"w";6.8[3].7.C=c+"w";6.8[3].7.G=f+"w";6.8[3].7.M=(6.1a-(b+g))+"w";6.I.7.F=b+"w";6.I.7.C=c+"w";6.I.7.G=d+"w";6.I.7.M=a+"w";6.I.7.W="2a";E.D.J.1k(6,"29",15 E.D.1D(c,b+g),15 E.D.1D(c+f,b),6.1C.2b())}1f A(!6.1Q){6.1j=n(6.L.13());6.2d()}};R.P.2x=B(e){9 z;9 g=6;6.1Q=X;A(6.1h){A((6.1H(e).x===6.V.x)&&(6.1H(e).y===6.V.y)){6.1U(e);N}9 k=Q.1s(6.V.x,6.11.x);9 f=Q.1s(6.V.y,6.11.y);9 l=Q.1o(6.V.x-6.11.x);9 b=Q.1o(6.V.y-6.11.y);9 c=1g;A(c){k+=6.T.C;f+=6.T.F}9 m=6.1C.2b();9 d=m.2c(15 E.D.1D(k,f+b));9 j=m.2c(15 E.D.1D(k+l,f));9 h=15 E.D.2U(d,j);z=6.L.2I();6.L.2S(h);A(6.L.2I()<z){6.L.43(z)}9 a=m.2N(d);9 i=m.2N(j);A(c){a.x-=6.T.C;a.y-=6.T.F;i.x-=6.T.C;i.y-=6.T.F}6.I.7.C=a.x+"w";6.I.7.F=i.y+"w";6.I.7.G=(Q.1o(i.x-a.x)-(6.1d.C+6.1d.1n))+"w";6.I.7.M=(Q.1o(i.y-a.y)-(6.1d.F+6.1d.1m))+"w";2R(B(){g.I.7.W="1c"},4e);6.1h=X;6.1T(e);E.D.J.1k(6,"4d",h);A(!6.1S(e)){6.1U(e)}}};R.P.1U=B(e){9 i;A(6.L&&6.Z){6.Z=X;A(6.1h){6.I.7.W="1c";6.1h=X}1b(i=0;i<6.8.1e;i++){6.8[i].7.W="1c"}A(6.1z){6.K.1v.7.C=-(6.Y.G*2)+"w";6.K.1q=6.12.1l;6.K.7.W=""}E.D.J.1k(6,"2w")}};E.D.1Z.P.4b=B(a){6.1J=15 R(6,a)};E.D.1Z.P.4a=B(){9 i;9 d=6.1J;A(d){1b(i=0;i<d.28.1e;++i){E.D.J.48(d.28[i])}6.13().2O(d.I);1b(i=0;i<d.8.1e;i++){6.13().2O(d.8[i])}A(d.1z){6.1W[d.1Y].47(d.2q)}d.1C.2u(S);6.1J=S}};E.D.1Z.P.46=B(){N 6.1J!==S};E.D.1Z.P.4g=B(){N 6.1J}})();',62,266,'||||||this|style|veilDiv_|var|||||||||||||||||||||||px||||if|function|left|maps|google|top|width|document|boxDiv_|event|buttonDiv_|map_|height|return|parseInt|prototype|Math|DragZoom|null|borderWidths_|0px|startPt_|display|false|visualSize_|hotKeyDown_||endPt_|visualTips_|getDiv|key_|new||||addDomListener|mapHeight_|for|none|boxBorderWidths_|length|else|true|dragging_|typeof|mapPosn_|trigger|off|bottom|right|abs|mapWidth_|title|undefined|min|case|opacity|firstChild|break|documentElement|currentStyle|visualEnabled_|getComputedStyle|onMouseDown_|prjov_|Point|mousedown|defaultView|on|getMousePoint_|border|dragZoom_|position|posY|shift|scrollTop|createElement|scrollLeft|mouseDown_|window|isHotKeyDown_|onMouseMove_|onKeyUp_|max|controls|visualPositionOffset_|visualPosition_|Map||absolute|div|activatedByControl_|body||mousePosn_|backgroundColor|listeners_|drag|block|getProjection|fromContainerPixelToLatLng|setVeilVisibility_|visualPositionIndex_|appendChild|offsetTop|borderBottomWidth|hidden|overflow|offsetLeft|offsetHeight|ctrl|pageX|borderTopWidth|activate|controlIndex_|4px|initControl_|switch|setMap|init_|deactivate|onMouseUp_|onMouseDownDocument_|onKeyDown_|cursor|offsetWidth|isMouseOnMap_|mode|zoom|clientX|alt|Turn|getZoom|visualSprite_|offsetParent|Size|borderRightWidth|fromLatLngToContainerPixel|removeChild|visualClass_|borderLeftWidth|setTimeout|fitBounds|white|LatLngBounds|transparent|MozUserSelect|dragstart|default|veilStyle|paneStyle|clientY|crosshair|ctrlKey|gray||pageY|6px|altKey|shiftKey|onselectstart|pointer|ondragstart|onmouseout|onmouseover|thick|src|toLowerCase|img|key|relative|className|onclick|push|index|onRemove|draw|scroll|ownerDocument|mouseup|onAdd|mousemove|OverlayView|marginTop|marginLeft|medium|keyup|keydown|100|boxStyle|alpha|keyCode|736AFF|solid|filter|hasOwnProperty|visualTips|in|visualSize|png|dragzoom_btn|ftr|mapfiles|com|split|gstatic|http|2px|visualSprite|string|visualPositionIndex|WebkitTransform|MozTransform|visualPositionOffset|LEFT_TOP|setZoom|ControlPosition|visualPosition|keyDragZoomEnabled|removeAt|removeListener|visualClass|disableKeyDragZoom|enableKeyDragZoom|visualEnabled|dragend|1000|while|getDragZoomObject|thin'.split('|'),0,{}))
\ No newline at end of file diff --git a/protected/extensions/egmap/assets/latloncontrol.js b/protected/extensions/egmap/assets/latloncontrol.js new file mode 100644 index 0000000..e009e26 --- /dev/null +++ b/protected/extensions/egmap/assets/latloncontrol.js @@ -0,0 +1,81 @@ +/** +* LatLngControl class displays the LatLng and pixel coordinates +* underneath the mouse within a container anchored to it. +* @param {google.maps.Map} map Map to add custom control to. +*/ +function LatLngControl(map) { + /** + * Offset the control container from the mouse by this amount. + */ + this.ANCHOR_OFFSET_ = new google.maps.Point(8, 8); + + /** + * Pointer to the HTML container. + */ + this.node_ = this.createHtmlNode_(); + + // Add control to the map. Position is irrelevant. + map.controls[google.maps.ControlPosition.TOP].push(this.node_); + + // Bind this OverlayView to the map so we can access MapCanvasProjection + // to convert LatLng to Point coordinates. + this.setMap(map); + + // Register an MVC property to indicate whether this custom control + // is visible or hidden. Initially hide control until mouse is over map. + this.set('visible', false); + } + + // Extend OverlayView so we can access MapCanvasProjection. + LatLngControl.prototype = new google.maps.OverlayView(); + LatLngControl.prototype.draw = function() {}; + + /** + * @private + * Helper function creates the HTML node which is the control container. + * @return {HTMLDivElement} + */ + LatLngControl.prototype.createHtmlNode_ = function() { + var divNode = document.createElement('div'); + divNode.id = 'latlng-control'; + divNode.index = 100; + divNode.style.backgroundColor = "#ffc"; + divNode.style.border = "1px solid #676767"; + divNode.style.fontFamily = "arial, helvetica, sans-serif"; + divNode.style.fontSize = "0.7em"; + divNode.style.padding = "2px 4px"; + divNode.style.position = "absolute"; + return divNode; + }; + + /** + * MVC property's state change handler function to show/hide the + * control container. + */ + LatLngControl.prototype.visible_changed = function() { + this.node_.style.display = this.get('visible') ? '' : 'none'; + }; + + /** + * Specified LatLng value is used to calculate pixel coordinates and + * update the control display. Container is also repositioned. + * @param {google.maps.LatLng} latLng Position to display + */ + LatLngControl.prototype.updatePosition = function(latLng) { + var projection = this.getProjection(); + var point = projection.fromLatLngToContainerPixel(latLng); + + // Update control position to be anchored next to mouse position. + this.node_.style.left = point.x + this.ANCHOR_OFFSET_.x + 'px'; + this.node_.style.top = point.y + this.ANCHOR_OFFSET_.y + 'px'; + + // Update control to display latlng and coordinates. + this.node_.innerHTML = [ + latLng.toUrlValue(4), + '<br/>', + point.x, + 'px, ', + point.y, + 'px' + ].join(''); +};
\ No newline at end of file diff --git a/protected/extensions/egmap/assets/markerclusterer_packed.js b/protected/extensions/egmap/assets/markerclusterer_packed.js new file mode 100644 index 0000000..9ef8385 --- /dev/null +++ b/protected/extensions/egmap/assets/markerclusterer_packed.js @@ -0,0 +1 @@ +eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(5(){7 d=32,f=33,g=34;5 j(a){8 5(b){3[a]=b}}5 k(a){8 5(){8 3[a]}}7 l;5 m(a,b,c){3.1f(m,13.12.22);3.b=a;3.a=[];3.m=[];3.$=[31,2X,2Y,35,3c];3.i=[];3.z=g;c=c||{};3.f=c.3b||37;3.V=c.1A||f;3.i=c.39||[];3.U=c.2V||3.O;3.T=c.2K||3.N;3.M=d;6(c.23!=25)3.M=c.23;3.p=g;6(c.21!=25)3.p=c.21;n(3);3.18(a);3.I=3.b.1t();7 e=3;13.12.1m.1x(3.b,"2M",5(){7 h=e.b.1P[e.b.1R()].1A,o=e.b.1t();6(!(o<0||o>h))6(e.I!=o){e.I=e.b.1t();e.k()}});13.12.1m.1x(3.b,"2U",5(){e.h()});b&&b.14&&3.B(b,g)}l=m.4;l.O="3E://13-12-3C-3B-3G.3M.3H/3I/3x/3l/3m/m";l.N="3k";l.1f=5(a,b){8 5(c){15(7 e 3g c.4)3.4[e]=c.4[e];8 3}.2D(a,[b])};l.1j=5(){6(!3.z){3.z=d;q(3)}};l.1k=5(){};5 n(a){6(!a.i.14)15(7 b=0,c;c=a.$[b];b++)a.i.16({1B:a.U+(b+1)+"."+a.T,1c:c,1l:c})}l.w=k("i");l.q=k("a");l.S=5(){8 3.a.14};l.H=5(){8 3.V||3.b.1P[3.b.1R()].1A};l.F=5(a,b){15(7 c=0,e=a.14,h=e;h!==0;){h=1y(h/10,10);c++}c=9.24(c,b);8{1e:e,1C:c}};l.Y=j("F");l.G=k("F");l.B=5(a,b){15(7 c=0,e;e=a[c];c++)t(3,e);b||3.h()};5 t(a,b){b.1g(g);b.18(f);b.r=g;b.2s&&13.12.1m.1x(b,"2t",5(){b.r=g;a.k();a.h()});a.a.16(b)}l.o=5(a,b){t(3,a);b||3.h()};5 u(a,b){7 c=-1;6(a.a.1n)c=a.a.1n(b);17 15(7 e=0,h;h=a.a[e];e++)6(h==b){c=e;27}6(c==-1)8 g;a.a.2z(c,1);b.1g(g);b.18(f);8 d}l.W=5(a,b){7 c=u(3,a);6(!b&&c){3.k();3.h();8 d}17 8 g};l.X=5(a,b){15(7 c=g,e=0,h;h=a[e];e++){h=u(3,h);c=c||h}6(!b&&c){3.k();3.h();8 d}};l.R=5(){8 3.m.14};l.1d=k("b");l.18=j("b");l.v=k("f");l.Z=j("f");l.u=5(a){7 b=3.1X(),c=1a 13.12.1F(a.1I().19(),a.1I().1i()),e=1a 13.12.1F(a.1J().19(),a.1J().1i());c=b.1v(c);c.x+=3.f;c.y-=3.f;e=b.1v(e);e.x-=3.f;e.y+=3.f;c=b.1Z(c);b=b.1Z(e);a.1f(c);a.1f(b);8 a};l.P=5(){3.k();3.a=[]};l.k=5(){15(7 a=0,b;b=3.m[a];a++)b.1p();15(a=0;b=3.a[a];a++){b.r=g;b.18(f);b.1g(g)}3.m=[]};l.h=5(){q(3)};5 q(a){6(a.z)15(7 b=a.u(1a 13.12.1z(a.b.1r().1J(),a.b.1r().1I())),c=0,e;e=a.a[c];c++)6(!e.r&&b.26(e.1b())){7 h=a;e=e;15(7 o=3h,r=f,x=0,p=2c 0;p=h.m[x];x++){7 i=p.1u();6(i){i=i;7 s=e.1b();6(!i||!s)i=0;17{7 y=(s.19()-i.19())*9.1q/1o,z=(s.1i()-i.1i())*9.1q/1o;i=9.1s(y/2)*9.1s(y/2)+9.2b(i.19()*9.1q/1o)*9.2b(s.19()*9.1q/1o)*9.1s(z/2)*9.1s(z/2);i=2h*2*9.2g(9.2a(i),9.2a(1-i))}6(i<o){o=i;r=p}}}6(r&&r.D.26(e.1b()))r.o(e);17{p=1a v(h);p.o(e);h.m.16(p)}}}5 v(a){3.j=a;3.b=a.1d();3.f=a.v();3.p=a.p;3.d=f;3.a=[];3.D=f;3.l=1a w(3,a.w(),a.v())}l=v.4;l.o=5(a){7 b;a:6(3.a.1n)b=3.a.1n(a)!=-1;17{b=0;15(7 c;c=3.a[b];b++)6(c==a){b=d;27 a}b=g}6(b)8 g;6(3.d){6(3.p){c=3.a.14+1;b=(3.d.19()*(c-1)+a.1b().19())/c;c=(3.d.1i()*(c-1)+a.1b().1i())/c;3.d=1a 13.12.1F(b,c);A(3)}}17{3.d=a.1b();A(3)}6(3.a.14==0){a.18(3.b);a.1g(d)}17 6(3.a.14==1){3.a[0].18(f);3.a[0].1g(g)}a.r=d;3.a.16(a);6(3.b.1t()>3.j.H())15(a=0;b=3.a[a];a++){b.18(3.b);b.1g(d)}17 6(3.a.14<2)B(3.l);17{b=3.j.G()(3.a,3.j.w().14);3.l.20(3.d);a=3.l;a.A=b;a.2i=b.1e;a.2e=b.1C;6(a.c)a.c.1Y=b.1e;b=9.2j(0,a.A.1C-1);b=9.24(a.i.14-1,b);b=a.i[b];a.L=b.1B;a.g=b.1c;a.n=b.1l;a.J=b.2d;a.e=b.2x;a.K=b.2k;a.C=b.2v;3.l.1W()}8 d};l.1r=5(){15(7 a=1a 13.12.1z(3.d,3.d),b=3.q(),c=0,e;e=b[c];c++)a.1f(e.1b());8 a};l.1p=5(){3.l.1p();3.a.14=0;2y 3.a};l.Q=5(){8 3.a.14};l.q=k("a");l.1u=k("d");5 A(a){a.D=a.j.u(1a 13.12.1z(a.d,a.d))}l.1d=k("b");5 w(a,b,c){a.j.1f(w,13.12.22);3.i=b;3.2B=c||0;3.t=a;3.d=f;3.b=a.1d();3.A=3.c=f;3.s=g;3.18(3.b)}l=w.4;l.1j=5(){3.c=1Q.2A("2u");6(3.s){3.c.1h.1M=C(3,D(3,3.d));3.c.1Y=3.A.1e}3.2n().2m.2l(3.c);7 a=3;13.12.1m.2o(3.c,"2p",5(){7 b=a.t.j;13.12.1m.2q(b,"2w",a.t);b.M&&a.b.2r(a.t.1r())})};5 D(a,b){7 c=a.1X().1v(b);c.x-=1y(a.n/2,10);c.y-=1y(a.g/2,10);8 c}l.1k=5(){6(3.s){7 a=D(3,3.d);3.c.1h.1D=a.y+"E";3.c.1h.1G=a.x+"E"}};5 B(a){6(a.c)a.c.1h.1N="2C";a.s=g}l.1W=5(){6(3.c){3.c.1h.1M=C(3,D(3,3.d));3.c.1h.1N=""}3.s=d};l.1p=5(){3.18(f)};l.1E=5(){6(3.c&&3.c.1O){B(3);3.c.1O.2f(3.c);3.c=f}};l.20=j("d");5 C(a,b){7 c=[];6(1Q.3r)c.16(\'3q:3p:3s.3t.3v(3u=3o,3n="\'+a.L+\'");\');17{c.16("1S-3i:1B("+a.L+");");c.16("1S-28:"+(a.C?a.C:"0 0")+";")}6(1H a.e==="3j"){1H a.e[0]==="1V"&&a.e[0]>0&&a.e[0]<a.g?c.16("1c:"+(a.g-a.e[0])+"E; 1U-1D:"+a.e[0]+"E;"):c.16("1c:"+a.g+"E; 1T-1c:"+a.g+"E;");1H a.e[1]==="1V"&&a.e[1]>0&&a.e[1]<a.n?c.16("1l:"+(a.n-a.e[1])+"E; 1U-1G:"+a.e[1]+"E;"):c.16("1l:"+a.n+"E; 1e-1K:1L;")}17 c.16("1c:"+a.g+"E; 1T-1c:"+a.g+"E; 1l:"+a.n+"E; 1e-1K:1L;");c.16("3w:3A; 1D:"+b.y+"E; 1G:"+b.x+"E; 3L:"+(a.J?a.J:"3F")+"; 28:3z; 1w-3y:"+(a.K?a.K:11)+"E; 1w-3D:3J,3K-3f; 1w-3e:2Q");8 c.2P("")}2O.2R=m;m.4.2S=m.4.o;m.4.2T=m.4.B;m.4.2N=m.4.P;m.4.2G=m.4.G;m.4.2F=m.4.v;m.4.2E=m.4.u;m.4.1d=m.4.1d;m.4.29=m.4.q;m.4.2H=m.4.H;m.4.2I=m.4.w;m.4.2L=m.4.R;m.4.2J=m.4.S;m.4.2W=m.4.h;m.4.38=m.4.W;m.4.3a=m.4.X;m.4.3d=m.4.k;m.4.36=m.4.Y;m.4.2Z=m.4.Z;m.4.1j=m.4.1j;m.4.1k=m.4.1k;v.4.1u=v.4.1u;v.4.30=v.4.Q;v.4.29=v.4.q;w.4.1j=w.4.1j;w.4.1k=w.4.1k;w.4.1E=w.4.1E})();',62,235,'|||this|prototype|function|if|var|return|Math|||||||||||||||||||||||||||||||px||||||||||||||||||||||||maps|google|length|for|push|else|setMap|lat|new|getPosition|height|getMap|text|extend|setVisible|style|lng|onAdd|draw|width|event|indexOf|180|remove|PI|getBounds|sin|getZoom|getCenter|fromLatLngToDivPixel|font|addListener|parseInt|LatLngBounds|maxZoom|url|index|top|onRemove|LatLng|left|typeof|getNorthEast|getSouthWest|align|center|cssText|display|parentNode|mapTypes|document|getMapTypeId|background|line|padding|number|show|getProjection|innerHTML|fromDivPixelToLatLng|setCenter|averageCenter|OverlayView|zoomOnClick|min|undefined|contains|break|position|getMarkers|sqrt|cos|void|textColor|aa|removeChild|atan2|6371|ca|max|textSize|appendChild|overlayImage|getPanes|addDomListener|click|trigger|fitBounds|draggable|dragend|DIV|backgroundPosition|clusterclick|anchor|delete|splice|createElement|ba|none|apply|getExtendedBounds|getGridSize|getCalculator|getMaxZoom|getStyles|getTotalMarkers|imageExtension|getTotalClusters|zoom_changed|clearMarkers|window|join|bold|MarkerClusterer|addMarker|addMarkers|idle|imagePath|redraw|56|66|setGridSize|getSize|53|true|null|false|78|setCalculator|60|removeMarker|styles|removeMarkers|gridSize|90|resetViewport|weight|serif|in|4E4|image|object|png|markerclusterer|images|src|scale|progid|filter|all|DXImageTransform|Microsoft|sizingMethod|AlphaImageLoader|cursor|trunk|size|absolute|pointer|library|utility|family|http|black|v3|com|svn|Arial|sans|color|googlecode'.split('|'),0,{})) diff --git a/protected/extensions/egmap/assets/markers/m1.png b/protected/extensions/egmap/assets/markers/m1.png Binary files differnew file mode 100644 index 0000000..329ff52 --- /dev/null +++ b/protected/extensions/egmap/assets/markers/m1.png diff --git a/protected/extensions/egmap/assets/markers/m2.png b/protected/extensions/egmap/assets/markers/m2.png Binary files differnew file mode 100644 index 0000000..b999cbc --- /dev/null +++ b/protected/extensions/egmap/assets/markers/m2.png diff --git a/protected/extensions/egmap/assets/markers/m3.png b/protected/extensions/egmap/assets/markers/m3.png Binary files differnew file mode 100644 index 0000000..9f30b30 --- /dev/null +++ b/protected/extensions/egmap/assets/markers/m3.png diff --git a/protected/extensions/egmap/assets/markers/m4.png b/protected/extensions/egmap/assets/markers/m4.png Binary files differnew file mode 100644 index 0000000..0d3f826 --- /dev/null +++ b/protected/extensions/egmap/assets/markers/m4.png diff --git a/protected/extensions/egmap/assets/markers/m5.png b/protected/extensions/egmap/assets/markers/m5.png Binary files differnew file mode 100644 index 0000000..61387d2 --- /dev/null +++ b/protected/extensions/egmap/assets/markers/m5.png diff --git a/protected/extensions/egmap/assets/markerwithlabel_packed.js b/protected/extensions/egmap/assets/markerwithlabel_packed.js new file mode 100644 index 0000000..c8e2493 --- /dev/null +++ b/protected/extensions/egmap/assets/markerwithlabel_packed.js @@ -0,0 +1 @@ +eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('8 t(a){2.3=a;2.6=X.1v("1V");2.6.4.L="R: 1g; 15: 1A;";2.p=X.1v("1V");2.p.4.L=2.6.4.L;2.p.23("2L","1Q w;");2.p.23("2w","1Q w;");2.v=X.1v("2o");2.v.4.L="R: 1g; z-2l: 2g; I: 16;";2.v.4.1b="-2a";2.v.4.1w="-2Y";2.v.2V="22://5.1X.1T/1R/1P/1M/2x.2v"}t.s=W 7.5.2n();t.s.2m=8(){r g=2;r l=w;r c=w;r o;r f;r i,12;r n;r d;r m=20;r h="29(22://5.1X.1T/1R/1P/1M/28.27)";r j=8(e){9(e.24){e.24()}e.2R=G;9(e.1Z){e.1Z()}};r k=8(){g.3.1W(2J)};2.1n().1S.S(2.6);2.1n().2D.S(2.p);2.1n().1S.S(2.v);2.1p=[7.5.q.M(2.p,"1N",8(e){9(g.3.N()||g.3.U()){2.4.19="1Y";7.5.q.B(g.3,"1N",e)}}),7.5.q.M(2.p,"1U",8(e){9((g.3.N()||g.3.U())&&!c){2.4.19=g.3.2r();7.5.q.B(g.3,"1U",e)}}),7.5.q.M(2.p,"1J",8(e){i=0;12=0;c=w;9(g.3.N()){l=G;2.4.19=h}9(g.3.N()||g.3.U()){7.5.q.B(g.3,"1J",e)}j(e)}),7.5.q.M(X,"1G",8(a){r b;9(l){l=w;g.p.4.19="1Y";7.5.q.B(g.3,"1G",a)}9(c){a.E=o;n=G;9(d){b=g.Q().1i(g.3.11());b.y+=m;g.3.J(g.Q().1E(b));2k{g.3.1W(7.5.2j.2i);2h(k,2f)}2e(e){}g.v.4.I="16"}g.3.T(f);c=w;7.5.q.B(g.3,"1D",a)}}),7.5.q.u(g.3.2d(),"2c",8(a){r b;9(l){a.E=W 7.5.2b(a.E.1d()-i,a.E.1c()-12);9(c){o=a.E;b=g.Q().1i(a.E);9(d){g.v.4.Y=b.x+"A";g.v.4.P=b.y+"A";g.v.4.I="";b.y-=m}g.3.J(g.Q().1E(b));9(d){g.p.4.P=(b.y+m)+"A"}7.5.q.B(g.3,"1C",a)}V{i=a.E.1d()-g.3.11().1d();12=a.E.1c()-g.3.11().1c();f=g.3.1a();g.3.T(1B);d=g.3.D("14");c=G;7.5.q.B(g.3,"1z",a)}}}),7.5.q.M(2.p,"1y",8(e){9(g.3.N()||g.3.U()){9(n){n=w}V{7.5.q.B(g.3,"1y",e);j(e)}}}),7.5.q.M(2.p,"1x",8(e){9(g.3.N()||g.3.U()){7.5.q.B(g.3,"1x",e);j(e)}}),7.5.q.u(2.3,"1z",8(a){9(!c){d=2.D("14")}}),7.5.q.u(2.3,"1C",8(a){9(!c){9(d){g.J(m);g.6.4.K=1B+(2.D("18")?-1:+1)}}}),7.5.q.u(2.3,"1D",8(a){9(!c){9(d){g.J(0)}}}),7.5.q.u(2.3,"2X",8(){g.J()}),7.5.q.u(2.3,"2W",8(){g.T()}),7.5.q.u(2.3,"2U",8(){g.17()}),7.5.q.u(2.3,"2T",8(){g.17()}),7.5.q.u(2.3,"2S",8(){g.1t()}),7.5.q.u(2.3,"2Q",8(){g.1f()}),7.5.q.u(2.3,"2P",8(){g.1e()}),7.5.q.u(2.3,"2O",8(){g.Z()}),7.5.q.u(2.3,"2M",8(){g.Z()})]};t.s.2K=8(){r i;2.6.1r.1h(2.6);2.p.1r.1h(2.p);2.v.1r.1h(2.v);26(i=0;i<2.1p.2I;i++){7.5.q.2G(2.1p[i])}};t.s.2F=8(){2.1f();2.1t();2.Z()};t.s.1f=8(){r a=2.3.D("1j");9(F a.2E==="H"){2.6.13=a;2.p.13=2.6.13}V{2.6.13="";2.6.S(a);a=a.2C(G);2.p.S(a)}};t.s.1t=8(){2.p.2B=2.3.2A()||""};t.s.Z=8(){r i,C;2.6.1o=2.3.D("1m");2.p.1o=2.6.1o;2.6.4.L="";2.p.4.L="";C=2.3.D("C");26(i 2z C){9(C.2y(i)){2.6.4[i]=C[i];2.p.4[i]=C[i]}}2.1L()};t.s.1L=8(){2.6.4.R="1g";2.6.4.15="1A";9(F 2.6.4.O!=="H"&&2.6.4.O!==""){2.6.4.1K="1O(O="+(2.6.4.O*2u)+")"}2.p.4.R=2.6.4.R;2.p.4.15=2.6.4.15;2.p.4.O=0.2H;2.p.4.1K="1O(O=1)";2.1e();2.J();2.17()};t.s.1e=8(){r a=2.3.D("1q");2.6.4.1b=-a.x+"A";2.6.4.1w=-a.y+"A";2.p.4.1b=-a.x+"A";2.p.4.1w=-a.y+"A"};t.s.J=8(a){r b=2.Q().1i(2.3.11());9(F a==="H"){a=0}2.6.4.Y=b.x+"A";2.6.4.P=(b.y-a)+"A";2.p.4.Y=2.6.4.Y;2.p.4.P=2.6.4.P;2.T()};t.s.T=8(){r a=(2.3.D("18")?-1:+1);9(F 2.3.1a()==="H"){2.6.4.K=2t(2.6.4.P,10)+a;2.p.4.K=2.6.4.K}V{2.6.4.K=2.3.1a()+a;2.p.4.K=2.6.4.K}};t.s.17=8(){9(2.3.D("1l")){2.6.4.I=2.3.2s()?"2N":"16"}V{2.6.4.I="16"}2.p.4.I=2.6.4.I};8 1k(a){a=a||{};a.1j=a.1j||"";a.1q=a.1q||W 7.5.2q(0,0);a.1m=a.1m||"2p";a.C=a.C||{};a.18=a.18||w;9(F a.1l==="H"){a.1l=G}9(F a.14==="H"){a.14=G}9(F a.21==="H"){a.21=G}9(F a.1I==="H"){a.1I=w}2.1H=W t(2);7.5.1s.25(2,1F)}1k.s=W 7.5.1s();1k.s.1u=8(a){7.5.1s.s.1u.25(2,1F);2.1H.1u(a)};',62,185,'||this|marker_|style|maps|labelDiv_|google|function|if||||||||||||||||eventDiv_|event|var|prototype|MarkerLabel_|addListener|crossDiv_|false||||px|trigger|labelStyle|get|latLng|typeof|true|undefined|display|setPosition|zIndex|cssText|addDomListener|getDraggable|opacity|top|getProjection|position|appendChild|setZIndex|getClickable|else|new|document|left|setStyles||getPosition|cLngOffset|innerHTML|raiseOnDrag|overflow|none|setVisible|labelInBackground|cursor|getZIndex|marginLeft|lng|lat|setAnchor|setContent|absolute|removeChild|fromLatLngToDivPixel|labelContent|MarkerWithLabel|labelVisible|labelClass|getPanes|className|listeners_|labelAnchor|parentNode|Marker|setTitle|setMap|createElement|marginTop|dblclick|click|dragstart|hidden|1000000|drag|dragend|fromDivPixelToLatLng|arguments|mouseup|label|draggable|mousedown|filter|setMandatoryStyles|mapfiles|mouseover|alpha|en_us|return|intl|overlayImage|com|mouseout|div|setAnimation|gstatic|pointer|stopPropagation||clickable|http|setAttribute|preventDefault|apply|for|cur|closedhand_8_8|url|8px|LatLng|mousemove|getMap|catch|1406|1000002|setTimeout|BOUNCE|Animation|try|index|onAdd|OverlayView|img|markerLabels|Point|getCursor|getVisible|parseInt|100|png|ondragstart|drag_cross_67_16|hasOwnProperty|in|getTitle|title|cloneNode|overlayMouseTarget|nodeType|draw|removeListener|01|length|null|onRemove|onselectstart|labelstyle_changed|block|labelclass_changed|labelanchor_changed|labelcontent_changed|cancelBubble|title_changed|labelvisible_changed|visible_changed|src|zindex_changed|position_changed|9px'.split('|'),0,{}))
\ No newline at end of file |
