diff --git a/static/img/m1.png b/static/img/m1.png new file mode 100644 index 00000000..329ff524 Binary files /dev/null and b/static/img/m1.png differ diff --git a/static/img/m2.png b/static/img/m2.png new file mode 100644 index 00000000..b999cbcf Binary files /dev/null and b/static/img/m2.png differ diff --git a/static/img/m3.png b/static/img/m3.png new file mode 100644 index 00000000..9f30b309 Binary files /dev/null and b/static/img/m3.png differ diff --git a/static/img/m4.png b/static/img/m4.png new file mode 100644 index 00000000..0d3f8263 Binary files /dev/null and b/static/img/m4.png differ diff --git a/static/img/m5.png b/static/img/m5.png new file mode 100644 index 00000000..61387d2a Binary files /dev/null and b/static/img/m5.png differ diff --git a/static/js/markerclusterer.js b/static/js/markerclusterer.js index d6c4dce3..b7677fc6 100644 --- a/static/js/markerclusterer.js +++ b/static/js/markerclusterer.js @@ -1,11 +1,11 @@ // ==ClosureCompiler== // @compilation_level ADVANCED_OPTIMIZATIONS -// @externs_url http://closure-compiler.googlecode.com/svn/trunk/contrib/externs/maps/google_maps_api_v3_3.js +// @externs_url https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/maps/google_maps_api_v3.js // ==/ClosureCompiler== /** * @name MarkerClusterer for Google Maps v3 - * @version version 1.0.1 + * @version version 1.0 * @author Luke Mahe * @fileoverview * The library creates and manages per-zoom-level clusters for large amounts of @@ -17,6 +17,9 @@ */ /** + * @license + * Copyright 2010 Google Inc. All Rights Reserved. + * * 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 @@ -43,7 +46,7 @@ * cluster. * 'zoomOnClick': (boolean) Whether the default behaviour of clicking on a * cluster is to zoom into it. - * 'averageCenter': (boolean) Wether the center of each cluster should be + * 'averageCenter': (boolean) Whether the center of each cluster should be * the average of all markers in the cluster. * 'minimumClusterSize': (number) The minimum number of markers to be in a * cluster before the markers are hidden and a count @@ -56,6 +59,7 @@ * 'textColor': (string) The text color. * 'textSize': (number) The text size. * 'backgroundPosition': (string) The position of the backgound x, y. + * 'iconAnchor': (Array) The anchor position of the icon x, y. * @constructor * @extends google.maps.OverlayView */ @@ -161,12 +165,7 @@ function MarkerClusterer(map, opt_markers, opt_options) { // Add the map event listeners var that = this; google.maps.event.addListener(this.map_, 'zoom_changed', function() { - // Determines map type and prevent illegal zoom levels var zoom = that.map_.getZoom(); - var minZoom = that.map_.minZoom || 0; - var maxZoom = Math.min(that.map_.maxZoom || 100, - that.map_.mapTypes[that.map_.getMapTypeId()].maxZoom); - zoom = Math.min(Math.max(zoom,minZoom),maxZoom); if (that.prevZoom_ != zoom) { that.prevZoom_ = zoom; @@ -179,7 +178,7 @@ function MarkerClusterer(map, opt_markers, opt_options) { }); // Finally, add the markers - if (opt_markers && (opt_markers.length || Object.keys(opt_markers).length)) { + if (opt_markers && opt_markers.length) { this.addMarkers(opt_markers, false); } } @@ -191,9 +190,7 @@ function MarkerClusterer(map, opt_markers, opt_options) { * @type {string} * @private */ -MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_ = - 'http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/' + - 'images/m'; +MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_ = '/static/img/m'; /** @@ -404,14 +401,8 @@ MarkerClusterer.prototype.getCalculator = function() { * @param {boolean=} opt_nodraw Whether to redraw the clusters. */ MarkerClusterer.prototype.addMarkers = function(markers, opt_nodraw) { - if (markers.length) { - for (var i = 0, marker; marker = markers[i]; i++) { - this.pushMarkerTo_(marker); - } - } else if (Object.keys(markers).length) { - for (var marker in markers) { - this.pushMarkerTo_(markers[marker]); - } + for (var i = 0, marker; marker = markers[i]; i++) { + this.pushMarkerTo_(marker); } if (!opt_nodraw) { this.redraw(); @@ -1052,12 +1043,14 @@ function ClusterIcon(cluster, styles, opt_padding) { /** * Triggers the clusterclick event and zoom's if the option is set. + * + * @param {google.maps.MouseEvent} event The event to propagate */ -ClusterIcon.prototype.triggerClusterClick = function() { +ClusterIcon.prototype.triggerClusterClick = function(event) { var markerClusterer = this.cluster_.getMarkerClusterer(); // Trigger the clusterclick event. - google.maps.event.trigger(markerClusterer, 'clusterclick', this.cluster_); + google.maps.event.trigger(markerClusterer, 'clusterclick', this.cluster_, event); if (markerClusterer.isZoomOnClick()) { // Zoom into the cluster. @@ -1082,8 +1075,18 @@ ClusterIcon.prototype.onAdd = function() { panes.overlayMouseTarget.appendChild(this.div_); var that = this; - google.maps.event.addDomListener(this.div_, 'click', function() { - that.triggerClusterClick(); + var isDragging = false; + google.maps.event.addDomListener(this.div_, 'click', function(event) { + // Only perform click when not preceded by a drag + if (!isDragging) { + that.triggerClusterClick(event); + } + }); + google.maps.event.addDomListener(this.div_, 'mousedown', function() { + isDragging = false; + }); + google.maps.event.addDomListener(this.div_, 'mousemove', function() { + isDragging = true; }); }; @@ -1097,8 +1100,14 @@ ClusterIcon.prototype.onAdd = function() { */ ClusterIcon.prototype.getPosFromLatLng_ = function(latlng) { var pos = this.getProjection().fromLatLngToDivPixel(latlng); - pos.x -= parseInt(this.width_ / 2, 10); - pos.y -= parseInt(this.height_ / 2, 10); + + if (typeof this.iconAnchor_ === 'object' && this.iconAnchor_.length === 2) { + pos.x -= this.iconAnchor_[0]; + pos.y -= this.iconAnchor_[1]; + } else { + pos.x -= parseInt(this.width_ / 2, 10); + pos.y -= parseInt(this.height_ / 2, 10); + } return pos; }; @@ -1194,6 +1203,7 @@ ClusterIcon.prototype.useStyle = function() { this.anchor_ = style['anchor']; this.textSize_ = style['textSize']; this.backgroundPosition_ = style['backgroundPosition']; + this.iconAnchor_ = style['iconAnchor']; }; @@ -1224,6 +1234,10 @@ ClusterIcon.prototype.createCss = function(pos) { this.anchor_[0] < this.height_) { style.push('height:' + (this.height_ - this.anchor_[0]) + 'px; padding-top:' + this.anchor_[0] + 'px;'); + } else if (typeof this.anchor_[0] === 'number' && this.anchor_[0] < 0 && + -this.anchor_[0] < this.height_) { + style.push('height:' + this.height_ + 'px; line-height:' + (this.height_ + this.anchor_[0]) + + 'px;'); } else { style.push('height:' + this.height_ + 'px; line-height:' + this.height_ + 'px;'); @@ -1299,12 +1313,3 @@ Cluster.prototype['getMarkers'] = Cluster.prototype.getMarkers; ClusterIcon.prototype['onAdd'] = ClusterIcon.prototype.onAdd; ClusterIcon.prototype['draw'] = ClusterIcon.prototype.draw; ClusterIcon.prototype['onRemove'] = ClusterIcon.prototype.onRemove; - -Object.keys = Object.keys || function(o) { - var result = []; - for(var name in o) { - if (o.hasOwnProperty(name)) - result.push(name); - } - return result; -}; diff --git a/web/templates/base.html b/web/templates/base.html index 1d8d06f2..702292ce 100644 --- a/web/templates/base.html +++ b/web/templates/base.html @@ -4,110 +4,110 @@
- - - - - - - - - - - - - - - - {% compress css %} - - - - - {% block custom_css %}{% endblock %} - {% endcompress %} - - - - - - - - - - - - - - - - - - - - - - {% block social %}{% endblock %} -Required fields are marked with an * asterisk. Feel free to add the event listing in your local language.
- - - - -Required fields are marked with an * asterisk. Feel free to add the event listing in your local language.
+ + + + +Unless you're organizing an event for a closed group of students, coworkers or friends, you will need to do some promotion to attract participants. Social media is a good promotional tool, and you can also get in touch with local media outlets. Feel free to use any parts of the following press releases for that purpose:
If you have additional questions about organizing and promoting your #codeEU event, you can get in touch with one of EU Code Week Ambassadors from your country or send us an email at info@codeweek.eu.
-Get involved: - - Organize or support events in your city -
- +