I've just released an upgrade of eBirdGM--the free code generator to help you embed Google Maps in your eBird checklist comments. Check it out below in action:
 | Embed Google Maps in eBird Checklists the Easy Way! |
This update also provides you with the ability to put up to 10 markers on your map, and gives you the new option of enabling/disabling multiple marker colors. Here's an example of the new potential at work:
Let's say these markers represent the movements of a rare Terek Sandpiper in Oostvaarderplassen, The Netherlands :)
If you like this code generator, you may want to embed it on your website. It's easy, just click on the code in the box below, and click Ctrl-C. Find the place on your website you'd like to paste the code and then click Ctrl-V. Your users will thoroughly enjoy the novel Google Maps in checklist comments idea!
<div style="background: rgb(223,238,245); border-left: 4px solid rgb(210,59,12);border-top:4px solid rgb(49,116,197);border-right:4px solid rgb(63,140,68);border-bottom:4px solid rgb(245,245,50);margin: 20px; padding: 10px 10px 10px 20px; text-align: left; width: 90%;border-radius:15px;width:375px;">
<div style="height:75px;">
<table><tr><td style="width:210px;height:75px;"><a href="http://www.birdventurebirding.com/2012/07/embed-google-maps-in-ebird-checklist.html"><img src="https://lh6.googleusercontent.com/-Saz5oDL2LXA/UAQW3LbV0BI/AAAAAAAAA6k/WxZbCGKBunY/s203/eBirdGMsmall.png" /></a></td><td style="margin-left:10px;border-left:1px solid rgb(200,200,200);padding-left:10px;font-weight:bold;">Embed Google Maps<br />in eBird Checklists<br />the Easy Way!</td></tr></table>
</div>
<hr />
<table>
<tr>
<td style="width:80px;"><b>Marker A:</b></td>
<td><input type="text" value="Latitude, Longitude" onfocus="clearText(id)" id="markerA" onblur="regenerateText(id)" style="background:rgb(250,250,250);outline:none;border:none;color:rgb(135,135,135);width:230px;font-style:italic;border-radius:10px;width:160px;padding:5px;" maxlength="25" />
<td> </td>
</tr>
</table>
<table>
<tr>
<td style="width:80px;"><b>Marker B:</b></td>
<td><input type="text" value="" id="markerB" style="background:rgb(250,250,250);outline:none;border:none;color:rgb(10,10,10,);width:230px;border-radius:10px;width:160px;padding:5px;" maxlength="25" />
<td> </td>
</tr>
</table>
<table>
<tr>
<td style="width:80px;"><b>Marker C:</b></td>
<td><input type="text" value="" id="markerC" style="background:rgb(250,250,250);outline:none;border:none;color:rgb(10,10,10);width:230px;border-radius:10px;width:160px;padding:5px;" maxlength="25" />
<td style="color:rgb(49,116,197);text-decoration:underline;padding:5px;cursor:pointer;" onclick="addMarker(this)">More ></td>
</tr>
</table>
<div id="markers">
</div>
<table>
<tr><td style="width:80px;"><b>Zoom:</b></td><td>
<input type="range" min="0" max="6" value="3" step="1" onchange="showValue(this.value)" id="zoomLevel" style="width:100px;outline:none;" /></td><td id="zoomValue">Normal</td>
</tr>
<tr><td><b>Map Type:</b></td><td><select style="background:rgb(250,250,250);outline:none;border:none;padding:0px 0px 0px 5px;" id="mapType"><option value="hybrid">Hybrid</option><option value="satellite">Satellite</option><option value="terrain">Terrain</option><option value="roadmap">Road Map</option></select></td><td></td>
</tr>
<tr><td><b>Colors:</b></td><td><input checked="checked" id="markerColors" type="checkbox" />Use Multiple Marker Colors</td><td> </td></tr>
<tr><td><b>Labels:</b></td><td><input checked="checked" id="showLabels" type="checkbox" />Show Labels?</td><td> </td></tr>
<tr><td><input onclick="getCode()" type="button" id="codeButton" value="Get Code!" /></td><td colspan="2"><a href="http://www.birdventurebirding.com/2012/07/embed-google-maps-in-ebird-checklist.html">Visit the eBirdGM Homepage</a></td></tr>
</table>
<div id="code">
</div>
<div id="codeSpot" style="background:white;width:100%;overflow-x:auto;white-space: nowrap;" onclick="selectText()">
</div>
<div id="notes">
</div>
</div>
<script type="text/javascript">
function getCode() {
document.getElementById("code").innerHTML="";
var mapType = document.getElementById("mapType").value;
var zoomLevel = Number(document.getElementById("zoomLevel").value);
var showLabels = document.getElementById("showLabels").checked;
var markerColors = document.getElementById("markerColors").checked;
var checkMarkers = new Array();
var markerNames=["A","B","C","D","E","F","G","H","I","J"];
var valid = "true";
for(i=0;i<10;i++){
var id = "marker" + markerNames[i];
if(document.getElementById(id)){
var value = document.getElementById(id).value;
if(value!=null&&value!="undefined"&&value!=""){
if(value.indexOf(".")>0&&value.indexOf(",")>0&&value.length>=14){
checkMarkers.push(value);
}
else{
document.getElementById("code").innerHTML+="<b><span style='color:red;'>Marker " + markerNames[i] + " is invalid.</span></b> ";
if(value=="Latitude, Longitude"){document.getElementById("code").innerHTML+="You must enter a coordinate for at least marker A.<br />";}
if(value.indexOf(",")==(-1)){document.getElementById("code").innerHTML+="It does not appear to have a comma (,) separating the coordinates.<br />";}
if(value.indexOf(".")==(-1)&&value!="Latitude, Longitude"){document.getElementById("code").innerHTML+="Make sure your coordinates are in decimal form (e.g. 85.4247,-73.5619). Your entry for this marker does not appear to have any decimals in it.<br />";}
if(value.length<15){document.getElementById("code").innerHTML+="Your coordinate is not precise enough. You must enter at least 4 decimal places. Remember, the accuracy of your coordinate is important!<br />";}
valid = "false";
}
}
}
}
if(valid=="true"){
var code='http://maps.googleapis.com/maps/api/staticmap?center=' + checkMarkers[0].replace(" ","").replace(" ","").replace(" ","") + '&zoom=' + (zoomLevel+12) + '&size=800x400';
for(i=0;i<checkMarkers.length;i++){
var colorArray=["blue","red","green","orange","yellow","purple","pink","brown","gray","white"];
if(markerColors){code+='&markers=color:' + colorArray[i] + '%7C';}
else{code+='&markers=color:blue%7C';}
if(showLabels){code+='label:' + markerNames[i] + '%7C';}
code += checkMarkers[i].replace(" ","").replace(" ","").replace(" ","");
}
code += '&maptype=' + mapType + '&sensor=false';
var linkURL = 'https://maps.google.com/?&t=p&z=' + (zoomLevel + 12) + '&q=' + checkMarkers[0].replace(" ","").replace(" ","");
document.getElementById("code").innerHTML="<hr /><table style='width:100%;'><tr><td style='width:50%;'><b>Generated Code:</b></td><td style='width:20%;text-align:right;'><a target='_blank' href=" + code + "><b>Preview</b></a></td></tr></table><br />";
document.getElementById("codeSpot").style.padding="5px";
document.getElementById("codeSpot").innerHTML='<a href="' + linkURL + '"><img src="' + code + '"><a><a href="http://birdventurebirding.com/"><img src="https://lh3.googleusercontent.com/-5dHlsU3JLWM/UARfvvu80qI/AAAAAAAAA7M/ZWt0sUCNHoA/s89/tiny.png"></a>';
document.getElementById("codeButton").value="Update";
document.getElementById("notes").innerHTML="Click code and press <span style='text-decoration:underline;'>Ctrl-C</span> (copy). In eBird checklist comment, press <span style='text-decoration:underline;'>Ctrl-V</span> (paste). Good luck!<br /><br /><b>eBirdGM is brought to you by <a href='http://www.birdventurebirding.com/'>Team Birdventure</a>.</b>"
}
}
function clearText(id){
if(document.getElementById(id).value=="Latitude, Longitude"){
document.getElementById(id).value="";
var boxValue = document.getElementById(id).value="";
document.getElementById(id).style.color="rgb(10,10,10)";
document.getElementById(id).style.fontStyle="normal";
}
}
function regenerateText(id) {
if(document.getElementById(id).value==""){
document.getElementById(id).value="Latitude, Longitude";
document.getElementById(id).style.color="rgb(135,135,135)";
document.getElementById(id).style.fontStyle="italic";
document.getElementById("showAddMarker").innerHTML="";
}
}
var showMore = "false";
function addMarker(addMarkerDIV){
var showMore = "true";
addMarkerDIV.innerHTML="";
var markerNames=["D","E","F","G","H","I","J"];
html="";
for(i=0;i<7;i++){
html+='<table><tr><td style="width:80px;"><b>Marker ' + markerNames[i] + ':</b></td><td><input type="text" id="marker' + markerNames[i] + '" style="background:rgb(250,250,250);outline:none;border:none;color:rgb(10,10,10);width:230px;border-radius:10px;width:160px;padding:5px;" maxlength="25" /></td></tr></table>';
}
document.getElementById("markers").innerHTML=html;
}
function showValue(newValue)
{
var zoomValues = ["Very Low","Lower","Low","Normal","High","Higher","Very High"];
document.getElementById("zoomValue").innerHTML=zoomValues[newValue];
}
function selectText() {
if (document.selection) {
var range = document.body.createTextRange();
range.moveToElementText(document.getElementById('codeSpot'));
range.select();
}
else if (window.getSelection) {
var range = document.createRange();
range.selectNode(document.getElementById('codeSpot'));
window.getSelection().addRange(range);
}
}
</script>