forked from ewildgoose/ym4r_gm
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix line endings - PLEASE MERGE ASAP and read notes below
This changeset is far reaching and sets all files to have git friendly line endings. However, this also means patches pre this commit will be hard to merge against the tree post this commit. If you have trouble merging this commit then instead do the following to achieve the same effect: - clone the repo as normal - change autocrlf=true (or =input if you prefer) in your gitconfig file (~/.gitconfig on unix) - blow away your repo, (eg rm -rf * ) it goes without saying to be careful and obviously don't delete the .git dir - get back to HEAD with: "git reset HEAD --hard" - now "git status" should show you loads of changes, also "git diff -b" should show you that they are just line ending changes - add files and commit as normal. All files should now be in a git friendly line ending format
- Loading branch information
1 parent
6d2e91b
commit 5789d8b
Showing
14 changed files
with
1,582 additions
and
1,582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
#Fill here the Google Maps API keys for your application | ||
#In this sample: | ||
#For development and test, we have only one possible host (localhost:3000), so there is only a single key associated with the mode. | ||
#In production, the app can be accessed through 2 different hosts: thepochisuperstarmegashow.com and exmaple.com. There then needs a 2-key hash. If you deployed to one host, only the API key would be needed (as in development and test). | ||
development: | ||
ABQIAAAAzMUFFnT9uH0xq39J0Y4kbhTJQa0g3IQ9GZqIMmInSLzwtGDKaBR6j135zrztfTGVOm2QlWnkaidDIQ | ||
test: | ||
ABQIAAAAzMUFFnT9uH0xq39J0Y4kbhTJQa0g3IQ9GZqIMmInSLzwtGDKaBR6j135zrztfTGVOm2QlWnkaidDIQ | ||
production: | ||
thepochisuperstarmegashow.com: ABQIAAAAzMUFFnT9uH0Sfg76Y4kbhTJQa0g3IQ9GZqIMmInSLzwtGDmlRT6e90j135zat56yhJKQlWnkaidDIQ | ||
#Fill here the Google Maps API keys for your application | ||
#In this sample: | ||
#For development and test, we have only one possible host (localhost:3000), so there is only a single key associated with the mode. | ||
#In production, the app can be accessed through 2 different hosts: thepochisuperstarmegashow.com and exmaple.com. There then needs a 2-key hash. If you deployed to one host, only the API key would be needed (as in development and test). | ||
|
||
development: | ||
ABQIAAAAzMUFFnT9uH0xq39J0Y4kbhTJQa0g3IQ9GZqIMmInSLzwtGDKaBR6j135zrztfTGVOm2QlWnkaidDIQ | ||
|
||
test: | ||
ABQIAAAAzMUFFnT9uH0xq39J0Y4kbhTJQa0g3IQ9GZqIMmInSLzwtGDKaBR6j135zrztfTGVOm2QlWnkaidDIQ | ||
|
||
production: | ||
thepochisuperstarmegashow.com: ABQIAAAAzMUFFnT9uH0Sfg76Y4kbhTJQa0g3IQ9GZqIMmInSLzwtGDmlRT6e90j135zat56yhJKQlWnkaidDIQ | ||
example.com: ABQIAAAAzMUFFnT9uH0Sfg98Y4kbhGFJQa0g3IQ9GZqIMmInSLrthJKGDmlRT98f4j135zat56yjRKQlWnkmod3TB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
require 'ym4r_gm' | ||
|
||
require 'ym4r_gm' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,114 +1,114 @@ | ||
function GMarkerGroup(active, markers, markersById) { | ||
this.active = active; | ||
this.markers = markers || new Array(); | ||
this.markersById = markersById || new Object(); | ||
} | ||
|
||
GMarkerGroup.prototype = new GOverlay(); | ||
|
||
GMarkerGroup.prototype.initialize = function(map) { | ||
this.map = map; | ||
|
||
if(this.active){ | ||
for(var i = 0 , len = this.markers.length; i < len; i++) { | ||
this.map.addOverlay(this.markers[i]); | ||
} | ||
for(var id in this.markersById){ | ||
this.map.addOverlay(this.markersById[id]); | ||
} | ||
} | ||
} | ||
|
||
//If not already done (ie if not inactive) remove all the markers from the map | ||
GMarkerGroup.prototype.remove = function() { | ||
this.deactivate(); | ||
} | ||
|
||
GMarkerGroup.prototype.redraw = function(force){ | ||
//Nothing to do : markers are already taken care of | ||
} | ||
|
||
//Copy the data to a new Marker Group | ||
GMarkerGroup.prototype.copy = function() { | ||
var overlay = new GMarkerGroup(this.active); | ||
overlay.markers = this.markers; //Need to do deep copy | ||
overlay.markersById = this.markersById; //Need to do deep copy | ||
return overlay; | ||
} | ||
|
||
//Inactivate the Marker group and clear the internal content | ||
GMarkerGroup.prototype.clear = function(){ | ||
//deactivate the map first (which removes the markers from the map) | ||
this.deactivate(); | ||
//Clear the internal content | ||
this.markers = new Array(); | ||
this.markersById = new Object(); | ||
} | ||
|
||
//Add a marker to the GMarkerGroup ; Adds it now to the map if the GMarkerGroup is active | ||
GMarkerGroup.prototype.addMarker = function(marker,id){ | ||
if(id == undefined){ | ||
this.markers.push(marker); | ||
}else{ | ||
this.markersById[id] = marker; | ||
} | ||
if(this.active && this.map != undefined ){ | ||
this.map.addOverlay(marker); | ||
} | ||
} | ||
|
||
//Open the info window (or info window tabs) of a marker | ||
GMarkerGroup.prototype.showMarker = function(id){ | ||
var marker = this.markersById[id]; | ||
if(marker != undefined){ | ||
GEvent.trigger(marker,"click"); | ||
} | ||
} | ||
|
||
//Activate (or deactivate depending on the argument) the GMarkerGroup | ||
GMarkerGroup.prototype.activate = function(active){ | ||
active = (active == undefined) ? true : active; | ||
if(!active){ | ||
if(this.active){ | ||
if(this.map != undefined){ | ||
for(var i = 0 , len = this.markers.length; i < len; i++){ | ||
this.map.removeOverlay(this.markers[i]) | ||
} | ||
for(var id in this.markersById){ | ||
this.map.removeOverlay(this.markersById[id]); | ||
} | ||
} | ||
this.active = false; | ||
} | ||
}else{ | ||
if(!this.active){ | ||
if(this.map != undefined){ | ||
for(var i = 0 , len = this.markers.length; i < len; i++){ | ||
this.map.addOverlay(this.markers[i]); | ||
} | ||
for(var id in this.markersById){ | ||
this.map.addOverlay(this.markersById[id]); | ||
} | ||
} | ||
this.active = true; | ||
} | ||
} | ||
} | ||
|
||
GMarkerGroup.prototype.centerAndZoomOnMarkers = function() { | ||
if(this.map != undefined){ | ||
//merge markers and markersById | ||
var tmpMarkers = this.markers.slice(); | ||
for (var id in this.markersById){ | ||
tmpMarkers.push(this.markersById[id]); | ||
} | ||
if(tmpMarkers.length > 0){ | ||
this.map.centerAndZoomOnMarkers(tmpMarkers); | ||
} | ||
} | ||
} | ||
|
||
//Deactivate the Group Overlay (convenience method) | ||
GMarkerGroup.prototype.deactivate = function(){ | ||
this.activate(false); | ||
} | ||
function GMarkerGroup(active, markers, markersById) { | ||
this.active = active; | ||
this.markers = markers || new Array(); | ||
this.markersById = markersById || new Object(); | ||
} | ||
|
||
GMarkerGroup.prototype = new GOverlay(); | ||
|
||
GMarkerGroup.prototype.initialize = function(map) { | ||
this.map = map; | ||
|
||
if(this.active){ | ||
for(var i = 0 , len = this.markers.length; i < len; i++) { | ||
this.map.addOverlay(this.markers[i]); | ||
} | ||
for(var id in this.markersById){ | ||
this.map.addOverlay(this.markersById[id]); | ||
} | ||
} | ||
} | ||
|
||
//If not already done (ie if not inactive) remove all the markers from the map | ||
GMarkerGroup.prototype.remove = function() { | ||
this.deactivate(); | ||
} | ||
|
||
GMarkerGroup.prototype.redraw = function(force){ | ||
//Nothing to do : markers are already taken care of | ||
} | ||
|
||
//Copy the data to a new Marker Group | ||
GMarkerGroup.prototype.copy = function() { | ||
var overlay = new GMarkerGroup(this.active); | ||
overlay.markers = this.markers; //Need to do deep copy | ||
overlay.markersById = this.markersById; //Need to do deep copy | ||
return overlay; | ||
} | ||
|
||
//Inactivate the Marker group and clear the internal content | ||
GMarkerGroup.prototype.clear = function(){ | ||
//deactivate the map first (which removes the markers from the map) | ||
this.deactivate(); | ||
//Clear the internal content | ||
this.markers = new Array(); | ||
this.markersById = new Object(); | ||
} | ||
|
||
//Add a marker to the GMarkerGroup ; Adds it now to the map if the GMarkerGroup is active | ||
GMarkerGroup.prototype.addMarker = function(marker,id){ | ||
if(id == undefined){ | ||
this.markers.push(marker); | ||
}else{ | ||
this.markersById[id] = marker; | ||
} | ||
if(this.active && this.map != undefined ){ | ||
this.map.addOverlay(marker); | ||
} | ||
} | ||
|
||
//Open the info window (or info window tabs) of a marker | ||
GMarkerGroup.prototype.showMarker = function(id){ | ||
var marker = this.markersById[id]; | ||
if(marker != undefined){ | ||
GEvent.trigger(marker,"click"); | ||
} | ||
} | ||
|
||
//Activate (or deactivate depending on the argument) the GMarkerGroup | ||
GMarkerGroup.prototype.activate = function(active){ | ||
active = (active == undefined) ? true : active; | ||
if(!active){ | ||
if(this.active){ | ||
if(this.map != undefined){ | ||
for(var i = 0 , len = this.markers.length; i < len; i++){ | ||
this.map.removeOverlay(this.markers[i]) | ||
} | ||
for(var id in this.markersById){ | ||
this.map.removeOverlay(this.markersById[id]); | ||
} | ||
} | ||
this.active = false; | ||
} | ||
}else{ | ||
if(!this.active){ | ||
if(this.map != undefined){ | ||
for(var i = 0 , len = this.markers.length; i < len; i++){ | ||
this.map.addOverlay(this.markers[i]); | ||
} | ||
for(var id in this.markersById){ | ||
this.map.addOverlay(this.markersById[id]); | ||
} | ||
} | ||
this.active = true; | ||
} | ||
} | ||
} | ||
|
||
GMarkerGroup.prototype.centerAndZoomOnMarkers = function() { | ||
if(this.map != undefined){ | ||
//merge markers and markersById | ||
var tmpMarkers = this.markers.slice(); | ||
for (var id in this.markersById){ | ||
tmpMarkers.push(this.markersById[id]); | ||
} | ||
if(tmpMarkers.length > 0){ | ||
this.map.centerAndZoomOnMarkers(tmpMarkers); | ||
} | ||
} | ||
} | ||
|
||
//Deactivate the Group Overlay (convenience method) | ||
GMarkerGroup.prototype.deactivate = function(){ | ||
this.activate(false); | ||
} |
Oops, something went wrong.