// Create a JSON2 object only if one does not already exist. We create the
// methods in a closure to avoid creating global variables.
var JSON2;
if (!JSON2) {
JSON2 = {};
}
(function () {
"use strict";
function f(n) {
// Format integers to have at least two digits.
return n < 10 ? '0' + n : n;
}
if (typeof Date.prototype.toJSON2 !== 'function') {
Date.prototype.toJSON2 = function (key) {
return isFinite(this.valueOf()) ?
this.getUTCFullYear() + '-' +
f(this.getUTCMonth() + 1) + '-' +
f(this.getUTCDate()) + 'T' +
f(this.getUTCHours()) + ':' +
f(this.getUTCMinutes()) + ':' +
f(this.getUTCSeconds()) + 'Z' : null;
};
String.prototype.toJSON2 =
Number.prototype.toJSON2 =
Boolean.prototype.toJSON2 = function (key) {
return this.valueOf();
};
}
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
gap,
indent,
meta = { // table of character substitutions
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
'"' : '\\"',
'\\': '\\\\'
},
rep;
function quote(string) {
// If the string contains no control characters, no quote characters, and no
// backslash characters, then we can safely slap some quotes around it.
// Otherwise we must also replace the offending characters with safe escape
// sequences.
escapable.lastIndex = 0;
return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
var c = meta[a];
return typeof c === 'string' ? c :
'\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
}) + '"' : '"' + string + '"';
}
function str(key, holder) {
// Produce a string from holder[key].
var i, // The loop counter.
k, // The member key.
v, // The member value.
length,
mind = gap,
partial,
value = holder[key];
// If the value has a toJSON2 method, call it to obtain a replacement value.
if (value && typeof value === 'object' &&
typeof value.toJSON2 === 'function') {
value = value.toJSON2(key);
}
// If we were called with a replacer function, then call the replacer to
// obtain a replacement value.
if (typeof rep === 'function') {
value = rep.call(holder, key, value);
}
// What happens next depends on the value's type.
switch (typeof value) {
case 'string':
return quote(value);
case 'number':
// JSON2 numbers must be finite. Encode non-finite numbers as null.
return isFinite(value) ? String(value) : 'null';
case 'boolean':
case 'null':
// If the value is a boolean or null, convert it to a string. Note:
// typeof null does not produce 'null'. The case is included here in
// the remote chance that this gets fixed someday.
return String(value);
// If the type is 'object', we might be dealing with an object or an array or
// null.
case 'object':
// Due to a specification blunder in ECMAScript, typeof null is 'object',
// so watch out for that case.
if (!value) {
return 'null';
}
// Make an array to hold the partial results of stringifying this object value.
gap += indent;
partial = [];
// Is the value an array?
if (Object.prototype.toString.apply(value) === '[object Array]') {
// The value is an array. Stringify every element. Use null as a placeholder
// for non-JSON2 values.
length = value.length;
for (i = 0; i < length; i += 1) {
partial[i] = str(i, value) || 'null';
}
// Join all of the elements together, separated with commas, and wrap them in
// brackets.
v = partial.length === 0 ? '[]' : gap ?
'[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' :
'[' + partial.join(',') + ']';
gap = mind;
return v;
}
// If the replacer is an array, use it to select the members to be stringified.
if (rep && typeof rep === 'object') {
length = rep.length;
for (i = 0; i < length; i += 1) {
k = rep[i];
if (typeof k === 'string') {
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
}
} else {
// Otherwise, iterate through all of the keys in the object.
for (k in value) {
if (Object.hasOwnProperty.call(value, k)) {
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
}
}
// Join all of the member texts together, separated with commas,
// and wrap them in braces.
v = partial.length === 0 ? '{}' : gap ?
'{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' :
'{' + partial.join(',') + '}';
gap = mind;
return v;
}
}
// If the JSON2 object does not yet have a stringify method, give it one.
if (typeof JSON2.stringify !== 'function') {
JSON2.stringify = function (value, replacer, space) {
// The stringify method takes a value and an optional replacer, and an optional
// space parameter, and returns a JSON2 text. The replacer can be a function
// that can replace values, or an array of strings that will select the keys.
// A default replacer method can be provided. Use of the space parameter can
// produce text that is more easily readable.
var i;
gap = '';
indent = '';
// If the space parameter is a number, make an indent string containing that
// many spaces.
if (typeof space === 'number') {
for (i = 0; i < space; i += 1) {
indent += ' ';
}
// If the space parameter is a string, it will be used as the indent string.
} else if (typeof space === 'string') {
indent = space;
}
// If there is a replacer, it must be a function or an array.
// Otherwise, throw an error.
rep = replacer;
if (replacer && typeof replacer !== 'function' &&
(typeof replacer !== 'object' ||
typeof replacer.length !== 'number')) {
throw new Error('JSON2.stringify');
}
// Make a fake root object containing our value under the key of ''.
// Return the result of stringifying the value.
return str('', {'': value});
};
}
// If the JSON2 object does not yet have a parse method, give it one.
if (typeof JSON2.parse !== 'function') {
JSON2.parse = function (text, reviver) {
// The parse method takes a text and an optional reviver function, and returns
// a JavaScript value if the text is a valid JSON2 text.
var j;
function walk(holder, key) {
// The walk method is used to recursively walk the resulting structure so
// that modifications can be made.
var k, v, value = holder[key];
if (value && typeof value === 'object') {
for (k in value) {
if (Object.hasOwnProperty.call(value, k)) {
v = walk(value, k);
if (v !== undefined) {
value[k] = v;
} else {
delete value[k];
}
}
}
}
return reviver.call(holder, key, value);
}
// Parsing happens in four stages. In the first stage, we replace certain
// Unicode characters with escape sequences. JavaScript handles many characters
// incorrectly, either silently deleting them, or treating them as line endings.
text = String(text);
cx.lastIndex = 0;
if (cx.test(text)) {
text = text.replace(cx, function (a) {
return '\\u' +
('0000' + a.charCodeAt(0).toString(16)).slice(-4);
});
}
// In the second stage, we run the text against regular expressions that look
// for non-JSON2 patterns. We are especially concerned with '()' and 'new'
// because they can cause invocation, and '=' because it can cause mutation.
// But just to be safe, we want to reject all unexpected forms.
// We split the second stage into 4 regexp operations in order to work around
// crippling inefficiencies in IE's and Safari's regexp engines. First we
// replace the JSON2 backslash pairs with '@' (a non-JSON2 character). Second, we
// replace all simple value tokens with ']' characters. Third, we delete all
// open brackets that follow a colon or comma or that begin the text. Finally,
// we look to see that the remaining characters are only whitespace or ']' or
// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
if (/^[\],:{}\s]*$/
.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
.replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
// In the third stage we use the eval function to compile the text into a
// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
// in JavaScript: it can begin a block or an object literal. We wrap the text
// in parens to eliminate the ambiguity.
j = eval('(' + text + ')');
// In the optional fourth stage, we recursively walk the new structure, passing
// each name/value pair to a reviver function for possible transformation.
return typeof reviver === 'function' ?
walk({'': j}, '') : j;
}
// If the text is not JSON2 parseable, then a SyntaxError is thrown.
throw new SyntaxError('JSON2.parse');
};
}
}());
//add contains function in Array
Array.prototype.contains = function(obj) {
var i = this.length;
while (i--) {
if (this[i] === obj) {
return true;
}
}
return false;
}
Array.prototype.max = function() {
var max = parseFloat(this[0]);
var len = this.length;
for (var i = 1; i < len; i++) if (parseFloat(this[i]) > max) max = parseFloat(this[i]);
return max;
}
Array.prototype.min = function() {
var min = parseFloat(this[0]);
var len = this.length;
for (var i = 1; i < len; i++) if (parseFloat(this[i]) < min) min = parseFloat(this[i]);
return min;
}
window.net=window.net||{};
net.imapbuilder=net.imapbuilder||{};
net.imapbuilder.gmap=net.imapbuilder.gmap||{};
var map;
var markers=[];
var labels=[];
var images=[];
var polylines=[];
var polygons=[];
var rectangles=[];
var circles=[];
var routes=[];
var current_route = 0;
var route_count = 0 ;
var map_geocoder;
var markerCluster;
var crowdMarkers=[];
var crowdMarkersId=0;
var crowdMarkersData = [] ;
//information box
var gmap_locationdetails;
var modal_div;
var crowdForm_div;
var markerID;
var tempMarker;
var tempMarkerAni;
var crowdGetLocation_div;
var errorMessage_div;
var infoZIndex = 0 ;
var heatMapArr = [];
var heatMapCon_colorRatio;
var cluster_infowindow ;
var cs_title = "Add a Location" ;
var cs_loginas = "Login as" ;
var cs_address = "Address" ;
var cs_desc = "Description" ;
var cs_data = "Crowdsourced data";
var clickCircle;
(function(){
var g=net.imapbuilder.gmap; // shorten the code of the namespace object
// icon list
g.iconlist=[];
g.iconlist[1]={};
g.iconlist[1].imagew="32";
g.iconlist[1].imageh="32";
g.iconlist[1].imageox="0";
g.iconlist[1].imageoy="0";
g.iconlist[1].imageax="16";
g.iconlist[1].imageay="32";
g.iconlist[2]={};
g.iconlist[2].imagew="32";
g.iconlist[2].imageh="32";
g.iconlist[2].imageox="0";
g.iconlist[2].imageoy="0";
g.iconlist[2].imageax="16";
g.iconlist[2].imageay="32";
g.iconlist[3]={};
g.iconlist[3].imagew="32";
g.iconlist[3].imageh="32";
g.iconlist[3].imageox="0";
g.iconlist[3].imageoy="0";
g.iconlist[3].imageax="16";
g.iconlist[3].imageay="32";
g.iconlist[4]={};
g.iconlist[4].imagew="32";
g.iconlist[4].imageh="32";
g.iconlist[4].imageox="0";
g.iconlist[4].imageoy="0";
g.iconlist[4].imageax="16";
g.iconlist[4].imageay="32";
g.iconlist[5]={};
g.iconlist[5].imagew="32";
g.iconlist[5].imageh="32";
g.iconlist[5].imageox="0";
g.iconlist[5].imageoy="0";
g.iconlist[5].imageax="16";
g.iconlist[5].imageay="32";
g.iconlist[6]={};
g.iconlist[6].imagew="32";
g.iconlist[6].imageh="32";
g.iconlist[6].imageox="0";
g.iconlist[6].imageoy="0";
g.iconlist[6].imageax="16";
g.iconlist[6].imageay="32";
g.iconlist[7]={};
g.iconlist[7].imagew="32";
g.iconlist[7].imageh="32";
g.iconlist[7].imageox="0";
g.iconlist[7].imageoy="0";
g.iconlist[7].imageax="16";
g.iconlist[7].imageay="32";
g.iconlist[8]={};
g.iconlist[8].imagew="32";
g.iconlist[8].imageh="32";
g.iconlist[8].imageox="0";
g.iconlist[8].imageoy="0";
g.iconlist[8].imageax="16";
g.iconlist[8].imageay="32";
g.iconlist[9]={};
g.iconlist[9].imagew="32";
g.iconlist[9].imageh="32";
g.iconlist[9].imageox="0";
g.iconlist[9].imageoy="0";
g.iconlist[9].imageax="16";
g.iconlist[9].imageay="32";
g.iconlist[10]={};
g.iconlist[10].imagew="32";
g.iconlist[10].imageh="32";
g.iconlist[10].imageox="0";
g.iconlist[10].imageoy="0";
g.iconlist[10].imageax="16";
g.iconlist[10].imageay="32";
g.iconlist[11]={};
g.iconlist[11].imagew="32";
g.iconlist[11].imageh="32";
g.iconlist[11].imageox="0";
g.iconlist[11].imageoy="0";
g.iconlist[11].imageax="16";
g.iconlist[11].imageay="32";
g.iconlist[12]={};
g.iconlist[12].imagew="32";
g.iconlist[12].imageh="32";
g.iconlist[12].imageox="0";
g.iconlist[12].imageoy="0";
g.iconlist[12].imageax="16";
g.iconlist[12].imageay="32";
g.iconlist[13]={};
g.iconlist[13].imagew="32";
g.iconlist[13].imageh="32";
g.iconlist[13].imageox="0";
g.iconlist[13].imageoy="0";
g.iconlist[13].imageax="16";
g.iconlist[13].imageay="32";
g.iconlist[14]={};
g.iconlist[14].imagew="32";
g.iconlist[14].imageh="32";
g.iconlist[14].imageox="0";
g.iconlist[14].imageoy="0";
g.iconlist[14].imageax="16";
g.iconlist[14].imageay="32";
g.iconlist[15]={};
g.iconlist[15].imagew="32";
g.iconlist[15].imageh="32";
g.iconlist[15].imageox="0";
g.iconlist[15].imageoy="0";
g.iconlist[15].imageax="11";
g.iconlist[15].imageay="32";
g.iconlist[16]={};
g.iconlist[16].imagew="32";
g.iconlist[16].imageh="32";
g.iconlist[16].imageox="0";
g.iconlist[16].imageoy="0";
g.iconlist[16].imageax="11";
g.iconlist[16].imageay="32";
g.iconlist[17]={};
g.iconlist[17].imagew="32";
g.iconlist[17].imageh="32";
g.iconlist[17].imageox="0";
g.iconlist[17].imageoy="0";
g.iconlist[17].imageax="11";
g.iconlist[17].imageay="32";
g.iconlist[18]={};
g.iconlist[18].imagew="32";
g.iconlist[18].imageh="32";
g.iconlist[18].imageox="0";
g.iconlist[18].imageoy="0";
g.iconlist[18].imageax="11";
g.iconlist[18].imageay="32";
g.iconlist[19]={};
g.iconlist[19].imagew="32";
g.iconlist[19].imageh="32";
g.iconlist[19].imageox="0";
g.iconlist[19].imageoy="0";
g.iconlist[19].imageax="11";
g.iconlist[19].imageay="32";
g.iconlist[20]={};
g.iconlist[20].imagew="32";
g.iconlist[20].imageh="32";
g.iconlist[20].imageox="0";
g.iconlist[20].imageoy="0";
g.iconlist[20].imageax="11";
g.iconlist[20].imageay="32";
g.iconlist[21]={};
g.iconlist[21].imagew="32";
g.iconlist[21].imageh="32";
g.iconlist[21].imageox="0";
g.iconlist[21].imageoy="0";
g.iconlist[21].imageax="11";
g.iconlist[21].imageay="32";
g.iconlist[22]={};
g.iconlist[22].imagew="31";
g.iconlist[22].imageh="35";
g.iconlist[22].imageox="0";
g.iconlist[22].imageoy="0";
g.iconlist[22].imageax="15";
g.iconlist[22].imageay="34";
g.iconlist[23]={};
g.iconlist[23].imagew="31";
g.iconlist[23].imageh="35";
g.iconlist[23].imageox="0";
g.iconlist[23].imageoy="0";
g.iconlist[23].imageax="15";
g.iconlist[23].imageay="34";
g.iconlist[24]={};
g.iconlist[24].imagew="31";
g.iconlist[24].imageh="35";
g.iconlist[24].imageox="0";
g.iconlist[24].imageoy="0";
g.iconlist[24].imageax="15";
g.iconlist[24].imageay="34";
g.iconlist[25]={};
g.iconlist[25].imagew="31";
g.iconlist[25].imageh="35";
g.iconlist[25].imageox="0";
g.iconlist[25].imageoy="0";
g.iconlist[25].imageax="15";
g.iconlist[25].imageay="34";
g.iconlist[26]={};
g.iconlist[26].imagew="31";
g.iconlist[26].imageh="35";
g.iconlist[26].imageox="0";
g.iconlist[26].imageoy="0";
g.iconlist[26].imageax="15";
g.iconlist[26].imageay="34";
g.iconlist[27]={};
g.iconlist[27].imagew="31";
g.iconlist[27].imageh="35";
g.iconlist[27].imageox="0";
g.iconlist[27].imageoy="0";
g.iconlist[27].imageax="15";
g.iconlist[27].imageay="34";
g.iconlist[28]={};
g.iconlist[28].imagew="31";
g.iconlist[28].imageh="35";
g.iconlist[28].imageox="0";
g.iconlist[28].imageoy="0";
g.iconlist[28].imageax="15";
g.iconlist[28].imageay="34";
g.iconlist[29]={};
g.iconlist[29].imagew="31";
g.iconlist[29].imageh="35";
g.iconlist[29].imageox="0";
g.iconlist[29].imageoy="0";
g.iconlist[29].imageax="15";
g.iconlist[29].imageay="34";
g.iconlist[30]={};
g.iconlist[30].imagew="31";
g.iconlist[30].imageh="35";
g.iconlist[30].imageox="0";
g.iconlist[30].imageoy="0";
g.iconlist[30].imageax="15";
g.iconlist[30].imageay="34";
g.iconlist[31]={};
g.iconlist[31].imagew="31";
g.iconlist[31].imageh="35";
g.iconlist[31].imageox="0";
g.iconlist[31].imageoy="0";
g.iconlist[31].imageax="15";
g.iconlist[31].imageay="34";
g.iconlist[32]={};
g.iconlist[32].imagew="31";
g.iconlist[32].imageh="35";
g.iconlist[32].imageox="0";
g.iconlist[32].imageoy="0";
g.iconlist[32].imageax="15";
g.iconlist[32].imageay="34";
g.iconlist[33]={};
g.iconlist[33].imagew="31";
g.iconlist[33].imageh="35";
g.iconlist[33].imageox="0";
g.iconlist[33].imageoy="0";
g.iconlist[33].imageax="15";
g.iconlist[33].imageay="34";
g.iconlist[34]={};
g.iconlist[34].imagew="31";
g.iconlist[34].imageh="35";
g.iconlist[34].imageox="0";
g.iconlist[34].imageoy="0";
g.iconlist[34].imageax="15";
g.iconlist[34].imageay="34";
g.iconlist[35]={};
g.iconlist[35].imagew="31";
g.iconlist[35].imageh="35";
g.iconlist[35].imageox="0";
g.iconlist[35].imageoy="0";
g.iconlist[35].imageax="15";
g.iconlist[35].imageay="34";
g.iconlist[36]={};
g.iconlist[36].imagew="31";
g.iconlist[36].imageh="35";
g.iconlist[36].imageox="0";
g.iconlist[36].imageoy="0";
g.iconlist[36].imageax="15";
g.iconlist[36].imageay="34";
g.iconlist[37]={};
g.iconlist[37].imagew="31";
g.iconlist[37].imageh="35";
g.iconlist[37].imageox="0";
g.iconlist[37].imageoy="0";
g.iconlist[37].imageax="15";
g.iconlist[37].imageay="34";
g.iconlist[38]={};
g.iconlist[38].imagew="31";
g.iconlist[38].imageh="35";
g.iconlist[38].imageox="0";
g.iconlist[38].imageoy="0";
g.iconlist[38].imageax="15";
g.iconlist[38].imageay="34";
g.iconlist[39]={};
g.iconlist[39].imagew="31";
g.iconlist[39].imageh="35";
g.iconlist[39].imageox="0";
g.iconlist[39].imageoy="0";
g.iconlist[39].imageax="15";
g.iconlist[39].imageay="34";
g.iconlist[40]={};
g.iconlist[40].imagew="31";
g.iconlist[40].imageh="35";
g.iconlist[40].imageox="0";
g.iconlist[40].imageoy="0";
g.iconlist[40].imageax="15";
g.iconlist[40].imageay="34";
g.iconlist[41]={};
g.iconlist[41].imagew="31";
g.iconlist[41].imageh="35";
g.iconlist[41].imageox="0";
g.iconlist[41].imageoy="0";
g.iconlist[41].imageax="15";
g.iconlist[41].imageay="34";
g.iconlist[42]={};
g.iconlist[42].imagew="31";
g.iconlist[42].imageh="35";
g.iconlist[42].imageox="0";
g.iconlist[42].imageoy="0";
g.iconlist[42].imageax="15";
g.iconlist[42].imageay="34";
g.iconlist[43]={};
g.iconlist[43].imagew="31";
g.iconlist[43].imageh="35";
g.iconlist[43].imageox="0";
g.iconlist[43].imageoy="0";
g.iconlist[43].imageax="15";
g.iconlist[43].imageay="34";
g.iconlist[44]={};
g.iconlist[44].imagew="31";
g.iconlist[44].imageh="35";
g.iconlist[44].imageox="0";
g.iconlist[44].imageoy="0";
g.iconlist[44].imageax="15";
g.iconlist[44].imageay="34";
g.iconlist[45]={};
g.iconlist[45].imagew="31";
g.iconlist[45].imageh="35";
g.iconlist[45].imageox="0";
g.iconlist[45].imageoy="0";
g.iconlist[45].imageax="15";
g.iconlist[45].imageay="34";
g.iconlist[46]={};
g.iconlist[46].imagew="31";
g.iconlist[46].imageh="35";
g.iconlist[46].imageox="0";
g.iconlist[46].imageoy="0";
g.iconlist[46].imageax="15";
g.iconlist[46].imageay="34";
g.iconlist[47]={};
g.iconlist[47].imagew="31";
g.iconlist[47].imageh="35";
g.iconlist[47].imageox="0";
g.iconlist[47].imageoy="0";
g.iconlist[47].imageax="15";
g.iconlist[47].imageay="34";
g.iconlist[48]={};
g.iconlist[48].imagew="31";
g.iconlist[48].imageh="35";
g.iconlist[48].imageox="0";
g.iconlist[48].imageoy="0";
g.iconlist[48].imageax="15";
g.iconlist[48].imageay="34";
g.iconlist[49]={};
g.iconlist[49].imagew="31";
g.iconlist[49].imageh="35";
g.iconlist[49].imageox="0";
g.iconlist[49].imageoy="0";
g.iconlist[49].imageax="15";
g.iconlist[49].imageay="34";
g.iconlist[50]={};
g.iconlist[50].imagew="31";
g.iconlist[50].imageh="35";
g.iconlist[50].imageox="0";
g.iconlist[50].imageoy="0";
g.iconlist[50].imageax="15";
g.iconlist[50].imageay="34";
g.iconlist[51]={};
g.iconlist[51].imagew="31";
g.iconlist[51].imageh="35";
g.iconlist[51].imageox="0";
g.iconlist[51].imageoy="0";
g.iconlist[51].imageax="15";
g.iconlist[51].imageay="34";
g.iconlist[52]={};
g.iconlist[52].imagew="31";
g.iconlist[52].imageh="35";
g.iconlist[52].imageox="0";
g.iconlist[52].imageoy="0";
g.iconlist[52].imageax="15";
g.iconlist[52].imageay="34";
g.iconlist[53]={};
g.iconlist[53].imagew="31";
g.iconlist[53].imageh="35";
g.iconlist[53].imageox="0";
g.iconlist[53].imageoy="0";
g.iconlist[53].imageax="15";
g.iconlist[53].imageay="34";
g.iconlist[54]={};
g.iconlist[54].imagew="31";
g.iconlist[54].imageh="35";
g.iconlist[54].imageox="0";
g.iconlist[54].imageoy="0";
g.iconlist[54].imageax="15";
g.iconlist[54].imageay="34";
g.iconlist[55]={};
g.iconlist[55].imagew="31";
g.iconlist[55].imageh="35";
g.iconlist[55].imageox="0";
g.iconlist[55].imageoy="0";
g.iconlist[55].imageax="15";
g.iconlist[55].imageay="34";
g.iconlist[56]={};
g.iconlist[56].imagew="31";
g.iconlist[56].imageh="35";
g.iconlist[56].imageox="0";
g.iconlist[56].imageoy="0";
g.iconlist[56].imageax="15";
g.iconlist[56].imageay="34";
g.iconlist[57]={};
g.iconlist[57].imagew="31";
g.iconlist[57].imageh="35";
g.iconlist[57].imageox="0";
g.iconlist[57].imageoy="0";
g.iconlist[57].imageax="15";
g.iconlist[57].imageay="34";
g.iconlist[58]={};
g.iconlist[58].imagew="31";
g.iconlist[58].imageh="35";
g.iconlist[58].imageox="0";
g.iconlist[58].imageoy="0";
g.iconlist[58].imageax="15";
g.iconlist[58].imageay="34";
g.iconlist[59]={};
g.iconlist[59].imagew="31";
g.iconlist[59].imageh="35";
g.iconlist[59].imageox="0";
g.iconlist[59].imageoy="0";
g.iconlist[59].imageax="15";
g.iconlist[59].imageay="34";
g.iconlist[60]={};
g.iconlist[60].imagew="31";
g.iconlist[60].imageh="35";
g.iconlist[60].imageox="0";
g.iconlist[60].imageoy="0";
g.iconlist[60].imageax="15";
g.iconlist[60].imageay="34";
g.iconlist[61]={};
g.iconlist[61].imagew="31";
g.iconlist[61].imageh="35";
g.iconlist[61].imageox="0";
g.iconlist[61].imageoy="0";
g.iconlist[61].imageax="15";
g.iconlist[61].imageay="34";
g.iconlist[62]={};
g.iconlist[62].imagew="31";
g.iconlist[62].imageh="35";
g.iconlist[62].imageox="0";
g.iconlist[62].imageoy="0";
g.iconlist[62].imageax="15";
g.iconlist[62].imageay="34";
g.iconlist[63]={};
g.iconlist[63].imagew="31";
g.iconlist[63].imageh="35";
g.iconlist[63].imageox="0";
g.iconlist[63].imageoy="0";
g.iconlist[63].imageax="15";
g.iconlist[63].imageay="34";
g.iconlist[64]={};
g.iconlist[64].imagew="31";
g.iconlist[64].imageh="35";
g.iconlist[64].imageox="0";
g.iconlist[64].imageoy="0";
g.iconlist[64].imageax="15";
g.iconlist[64].imageay="34";
g.iconlist[65]={};
g.iconlist[65].imagew="31";
g.iconlist[65].imageh="35";
g.iconlist[65].imageox="0";
g.iconlist[65].imageoy="0";
g.iconlist[65].imageax="15";
g.iconlist[65].imageay="34";
g.iconlist[66]={};
g.iconlist[66].imagew="31";
g.iconlist[66].imageh="35";
g.iconlist[66].imageox="0";
g.iconlist[66].imageoy="0";
g.iconlist[66].imageax="15";
g.iconlist[66].imageay="34";
g.iconlist[67]={};
g.iconlist[67].imagew="31";
g.iconlist[67].imageh="35";
g.iconlist[67].imageox="0";
g.iconlist[67].imageoy="0";
g.iconlist[67].imageax="15";
g.iconlist[67].imageay="34";
g.iconlist[68]={};
g.iconlist[68].imagew="31";
g.iconlist[68].imageh="35";
g.iconlist[68].imageox="0";
g.iconlist[68].imageoy="0";
g.iconlist[68].imageax="15";
g.iconlist[68].imageay="34";
g.iconlist[69]={};
g.iconlist[69].imagew="31";
g.iconlist[69].imageh="35";
g.iconlist[69].imageox="0";
g.iconlist[69].imageoy="0";
g.iconlist[69].imageax="15";
g.iconlist[69].imageay="34";
g.iconlist[70]={};
g.iconlist[70].imagew="31";
g.iconlist[70].imageh="35";
g.iconlist[70].imageox="0";
g.iconlist[70].imageoy="0";
g.iconlist[70].imageax="15";
g.iconlist[70].imageay="34";
g.iconlist[71]={};
g.iconlist[71].imagew="31";
g.iconlist[71].imageh="35";
g.iconlist[71].imageox="0";
g.iconlist[71].imageoy="0";
g.iconlist[71].imageax="15";
g.iconlist[71].imageay="34";
g.iconlist[72]={};
g.iconlist[72].imagew="20";
g.iconlist[72].imageh="20";
g.iconlist[72].imageox="0";
g.iconlist[72].imageoy="0";
g.iconlist[72].imageax="10";
g.iconlist[72].imageay="10";
g.iconlist[73]={};
g.iconlist[73].imagew="20";
g.iconlist[73].imageh="20";
g.iconlist[73].imageox="0";
g.iconlist[73].imageoy="0";
g.iconlist[73].imageax="10";
g.iconlist[73].imageay="10";
g.iconlist[74]={};
g.iconlist[74].imagew="20";
g.iconlist[74].imageh="20";
g.iconlist[74].imageox="0";
g.iconlist[74].imageoy="0";
g.iconlist[74].imageax="10";
g.iconlist[74].imageay="10";
g.iconlist[75]={};
g.iconlist[75].imagew="12";
g.iconlist[75].imageh="12";
g.iconlist[75].imageox="0";
g.iconlist[75].imageoy="0";
g.iconlist[75].imageax="6";
g.iconlist[75].imageay="12";
g.iconlist[76]={};
g.iconlist[76].imagew="12";
g.iconlist[76].imageh="12";
g.iconlist[76].imageox="0";
g.iconlist[76].imageoy="0";
g.iconlist[76].imageax="6";
g.iconlist[76].imageay="12";
g.iconlist[77]={};
g.iconlist[77].imagew="12";
g.iconlist[77].imageh="12";
g.iconlist[77].imageox="0";
g.iconlist[77].imageoy="0";
g.iconlist[77].imageax="6";
g.iconlist[77].imageay="12";
g.iconlist[78]={};
g.iconlist[78].imagew="12";
g.iconlist[78].imageh="12";
g.iconlist[78].imageox="0";
g.iconlist[78].imageoy="0";
g.iconlist[78].imageax="6";
g.iconlist[78].imageay="12";
g.iconlist[79]={};
g.iconlist[79].imagew="12";
g.iconlist[79].imageh="12";
g.iconlist[79].imageox="0";
g.iconlist[79].imageoy="0";
g.iconlist[79].imageax="6";
g.iconlist[79].imageay="12";
g.iconlist[80]={};
g.iconlist[80].imagew="12";
g.iconlist[80].imageh="12";
g.iconlist[80].imageox="0";
g.iconlist[80].imageoy="0";
g.iconlist[80].imageax="6";
g.iconlist[80].imageay="12";
g.iconlist[81]={};
g.iconlist[81].imagew="12";
g.iconlist[81].imageh="12";
g.iconlist[81].imageox="0";
g.iconlist[81].imageoy="0";
g.iconlist[81].imageax="6";
g.iconlist[81].imageay="12";
g.iconlist[82]={};
g.iconlist[82].imagew="12";
g.iconlist[82].imageh="12";
g.iconlist[82].imageox="0";
g.iconlist[82].imageoy="0";
g.iconlist[82].imageax="6";
g.iconlist[82].imageay="12";
g.iconlist[83]={};
g.iconlist[83].imagew="12";
g.iconlist[83].imageh="12";
g.iconlist[83].imageox="0";
g.iconlist[83].imageoy="0";
g.iconlist[83].imageax="6";
g.iconlist[83].imageay="12";
g.iconlist[84]={};
g.iconlist[84].imagew="12";
g.iconlist[84].imageh="12";
g.iconlist[84].imageox="0";
g.iconlist[84].imageoy="0";
g.iconlist[84].imageax="6";
g.iconlist[84].imageay="12";
g.iconlist[85]={};
g.iconlist[85].imagew="12";
g.iconlist[85].imageh="12";
g.iconlist[85].imageox="0";
g.iconlist[85].imageoy="0";
g.iconlist[85].imageax="6";
g.iconlist[85].imageay="12";
g.iconlist[86]={};
g.iconlist[86].imagew="12";
g.iconlist[86].imageh="12";
g.iconlist[86].imageox="0";
g.iconlist[86].imageoy="0";
g.iconlist[86].imageax="6";
g.iconlist[86].imageay="12";
g.iconlist[87]={};
g.iconlist[87].imagew="31";
g.iconlist[87].imageh="35";
g.iconlist[87].imageox="0";
g.iconlist[87].imageoy="0";
g.iconlist[87].imageax="15";
g.iconlist[87].imageay="35";
g.iconlist[88]={};
g.iconlist[88].imagew="31";
g.iconlist[88].imageh="35";
g.iconlist[88].imageox="0";
g.iconlist[88].imageoy="0";
g.iconlist[88].imageax="15";
g.iconlist[88].imageay="35";
g.iconlist[89]={};
g.iconlist[89].imagew="31";
g.iconlist[89].imageh="35";
g.iconlist[89].imageox="0";
g.iconlist[89].imageoy="0";
g.iconlist[89].imageax="15";
g.iconlist[89].imageay="35";
g.iconlist[90]={};
g.iconlist[90].imagew="31";
g.iconlist[90].imageh="35";
g.iconlist[90].imageox="0";
g.iconlist[90].imageoy="0";
g.iconlist[90].imageax="15";
g.iconlist[90].imageay="35";
g.iconlist[91]={};
g.iconlist[91].imagew="31";
g.iconlist[91].imageh="35";
g.iconlist[91].imageox="0";
g.iconlist[91].imageoy="0";
g.iconlist[91].imageax="15";
g.iconlist[91].imageay="35";
g.iconlist[92]={};
g.iconlist[92].imagew="31";
g.iconlist[92].imageh="35";
g.iconlist[92].imageox="0";
g.iconlist[92].imageoy="0";
g.iconlist[92].imageax="15";
g.iconlist[92].imageay="35";
g.iconlist[93]={};
g.iconlist[93].imagew="31";
g.iconlist[93].imageh="35";
g.iconlist[93].imageox="0";
g.iconlist[93].imageoy="0";
g.iconlist[93].imageax="15";
g.iconlist[93].imageay="35";
g.iconlist[94]={};
g.iconlist[94].imagew="31";
g.iconlist[94].imageh="35";
g.iconlist[94].imageox="0";
g.iconlist[94].imageoy="0";
g.iconlist[94].imageax="15";
g.iconlist[94].imageay="35";
g.iconlist[95]={};
g.iconlist[95].imagew="31";
g.iconlist[95].imageh="35";
g.iconlist[95].imageox="0";
g.iconlist[95].imageoy="0";
g.iconlist[95].imageax="15";
g.iconlist[95].imageay="35";
g.expire=true; var limit_object = 8;
var object_count = 0 ;
var opened_window ;
var searchMarkerID = 0 ;
g.run=function(d){
g.data=JSON2.parse(d);
if( g.data.datalist == undefined){
g.data.datalist={};
g.data.datalist.position=""; // top , right, left, bottom
g.data.datalist.width=""; // none if top or bottom
g.data.datalist.height=""; // none if left or right
g.data.datalist.bgcolor="#F0F0F0";
}else{
if( g.data.datalist.position != undefined){
var positionArr=["", "top", "bottom", "left", "right"];
g.data.datalist.position=positionArr[g.data.datalist.position] ;
}
}
if(g.data.datalist.showmarkers== undefined)
g.data.datalist.showmarkers=-1;
if( g.data.crowdmap == undefined){
g.data.crowdmap={};
g.data.crowdmap.mode="";
g.data.crowdmap.markericon=3;
}
//g.data.width="800px";
//g.data.height="600px";
// modify to 100% if browser is mobile
/*
if(navigator.userAgent.indexOf('iPhone')!=-1||navigator.userAgent.indexOf('Android')!=-1){
g.data.width=100;
g.data.width_unit='%';
g.data.height=100;
g.data.height_unit='%';
}
*/
var gmap_informationbox_style="overflow: hidden; border: 1px solid #DDD; font-family: Verdana,Geneva,sans-serif; font-size: 12px; margin: 5px;";
var width = g.data.width+g.data.width_unit;
var height = g.data.height+g.data.height_unit;
if( g.data.datalist.position=="top"||g.data.datalist.position=="left" )
document.write('
'+
''+
'');
else
document.write(''+
''+
'');
var script=document.createElement('script');
var lang = '';
if(g.data.lang != undefined && g.data.lang != "")
lang = '&language='+g.data.lang;
// here we dynamically determine whether mapkey is used
script.src='//maps.google.com/maps/api/js?key='+net.imapbuilder.gmap.mapkey+'&callback=net.imapbuilder.gmap.initialize&libraries=geometry'+lang; // &v=3.3
script.type='text/javascript';
document.body.appendChild(script);
if( g.data.font_size!=undefined)
document.getElementById('gmap_'+g.data.fileid).style.fontSize=g.data.font_size+'px';
if( g.data.font_family!=undefined)
document.getElementById('gmap_'+g.data.fileid).style.fontFamily=g.data.font_family;
}
// get device width and height
g.getWidth=function(){
xWidth = null;
if(window.screen != null)
xWidth = window.screen.availWidth;
if(window.innerWidth != null)
xWidth = window.innerWidth;
if(document.body != null)
xWidth = document.body.clientWidth;
return xWidth;
}
g.getHeight=function() {
xHeight = null;
if(window.screen != null)
xHeight = window.screen.availHeight;
if(window.innerHeight != null)
xHeight = window.innerHeight;
if(document.body != null)
xHeight = document.body.clientHeight;
return xHeight;
}
g.initialize=function(){
map_geocoder=new google.maps.Geocoder();
// start of clustering function
//if(g.data.clustering===true){
function MarkerClusterer(map, opt_markers, opt_options) {
// MarkerClusterer implements google.maps.OverlayView interface. We use the
// extend function to extend MarkerClusterer with google.maps.OverlayView
// because it might not always be available when the code is defined so we
// look for it at the last possible moment. If it doesn't exist now then
// there is no point going ahead :)
this.extend(MarkerClusterer, google.maps.OverlayView);
this.map_ = map;
/**
* @type {Array.}
* @private
*/
this.markers_ = [];
/**
* @type {Array.}
*/
this.clusters_ = [];
this.sizes = [53, 56, 66, 78, 90];
/**
* @private
*/
this.styles_ = [];
/**
* @type {boolean}
* @private
*/
this.ready_ = false;
var options = opt_options || {};
/**
* @type {number}
* @private
*/
this.gridSize_ = options['gridSize'] || 60;
/**
* @private
*/
this.minClusterSize_ = options['minimumClusterSize'] || 2;
/**
* @type {?number}
* @private
*/
this.maxZoom_ = options['maxZoom'] || null;
this.styles_ = options['styles'] || [];
/**
* @type {string}
* @private
*/
this.imagePath_ = options['imagePath'] ||
this.MARKER_CLUSTER_IMAGE_PATH_;
/**
* @type {string}
* @private
*/
this.imageExtension_ = options['imageExtension'] ||
this.MARKER_CLUSTER_IMAGE_EXTENSION_;
/**
* @type {boolean}
* @private
*/
this.zoomOnClick_ = true;
if (options['zoomOnClick'] != undefined) {
this.zoomOnClick_ = options['zoomOnClick'];
}
/**
* @type {boolean}
* @private
*/
this.averageCenter_ = false;
if (options['averageCenter'] != undefined) {
this.averageCenter_ = options['averageCenter'];
}
this.setupStyles_();
this.setMap(map);
/**
* @type {number}
* @private
*/
this.prevZoom_ = this.map_.getZoom();
// Add the map event listeners
var that = this;
google.maps.event.addListener(this.map_, 'zoom_changed', function() {
var zoom = that.map_.getZoom();
if (that.prevZoom_ != zoom) {
that.prevZoom_ = zoom;
that.resetViewport();
}
});
google.maps.event.addListener(this.map_, 'idle', function() {
that.redraw();
});
// Finally, add the markers
if (opt_markers && opt_markers.length) {
this.addMarkers(opt_markers, false);
}
}
/**
* The marker cluster image path.
*
* @type {string}
* @private
*/
MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_ =
'//google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/' +
'images/m';
/**
* The marker cluster image path.
*
* @type {string}
* @private
*/
MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_ = 'png';
/**
* Extends a objects prototype by anothers.
*
* @param {Object} obj1 The object to be extended.
* @param {Object} obj2 The object to extend with.
* @return {Object} The new extended object.
* @ignore
*/
MarkerClusterer.prototype.extend = function(obj1, obj2) {
return (function(object) {
for (var property in object.prototype) {
this.prototype[property] = object.prototype[property];
}
return this;
}).apply(obj1, [obj2]);
};
/**
* Implementaion of the interface method.
* @ignore
*/
MarkerClusterer.prototype.onAdd = function() {
this.setReady_(true);
};
/**
* Implementaion of the interface method.
* @ignore
*/
MarkerClusterer.prototype.draw = function() {};
/**
* Sets up the styles object.
*
* @private
*/
MarkerClusterer.prototype.setupStyles_ = function() {
if (this.styles_.length) {
return;
}
for (var i = 0, size; size = this.sizes[i]; i++) {
this.styles_.push({
url: this.imagePath_ + (i + 1) + '.' + this.imageExtension_,
height: size,
width: size
});
}
};
/**
* Fit the map to the bounds of the markers in the clusterer.
*/
MarkerClusterer.prototype.fitMapToMarkers = function() {
var markers = this.getMarkers();
var bounds = new google.maps.LatLngBounds();
for (var i = 0, marker; marker = markers[i]; i++) {
bounds.extend(marker.getPosition());
}
this.map_.fitBounds(bounds);
};
/**
* Sets the styles.
*
* @param {Object} styles The style to set.
*/
MarkerClusterer.prototype.setStyles = function(styles) {
this.styles_ = styles;
};
/**
* Gets the styles.
*
* @return {Object} The styles object.
*/
MarkerClusterer.prototype.getStyles = function() {
return this.styles_;
};
/**
* Whether zoom on click is set.
*
* @return {boolean} True if zoomOnClick_ is set.
*/
MarkerClusterer.prototype.isZoomOnClick = function() {
return this.zoomOnClick_;
};
/**
* Whether average center is set.
*
* @return {boolean} True if averageCenter_ is set.
*/
MarkerClusterer.prototype.isAverageCenter = function() {
return this.averageCenter_;
};
/**
* Returns the array of markers in the clusterer.
*
* @return {Array.} The markers.
*/
MarkerClusterer.prototype.getMarkers = function() {
return this.markers_;
};
/**
* Returns the number of markers in the clusterer
*
* @return {Number} The number of markers.
*/
MarkerClusterer.prototype.getTotalMarkers = function() {
return this.markers_.length;
};
/**
* Sets the max zoom for the clusterer.
*
* @param {number} maxZoom The max zoom level.
*/
MarkerClusterer.prototype.setMaxZoom = function(maxZoom) {
this.maxZoom_ = maxZoom;
};
/**
* Gets the max zoom for the clusterer.
*
* @return {number} The max zoom level.
*/
MarkerClusterer.prototype.getMaxZoom = function() {
return this.maxZoom_;
};
/**
* The function for calculating the cluster icon image.
*
* @param {Array.} markers The markers in the clusterer.
* @param {number} numStyles The number of styles available.
* @return {Object} A object properties: 'text' (string) and 'index' (number).
* @private
*/
MarkerClusterer.prototype.calculator_ = function(markers, numStyles) {
var index = 0;
var count = markers.length;
var dv = count;
while (dv !== 0) {
dv = parseInt(dv / 10, 10);
index++;
}
index = Math.min(index, numStyles);
return {
text: count,
index: index
};
};
/**
* Set the calculator function.
*
* @param {function(Array, number)} calculator The function to set as the
* calculator. The function should return a object properties:
* 'text' (string) and 'index' (number).
*
*/
MarkerClusterer.prototype.setCalculator = function(calculator) {
this.calculator_ = calculator;
};
/**
* Get the calculator function.
*
* @return {function(Array, number)} the calculator function.
*/
MarkerClusterer.prototype.getCalculator = function() {
return this.calculator_;
};
/**
* Add an array of markers to the clusterer.
*
* @param {Array.} markers The markers to add.
* @param {boolean=} opt_nodraw Whether to redraw the clusters.
*/
MarkerClusterer.prototype.addMarkers = function(markers, opt_nodraw) {
/*
for (var i = 0, marker; marker = markers[i]; i++) {
this.pushMarkerTo_(marker);
}
*/
//Terry modified 20120326
for(var i = 0 ; i < markers.length ; i++){
if( markers[i] != undefined )
this.pushMarkerTo_(markers[i]);
}
if (!opt_nodraw) {
this.redraw();
}
};
/**
* Pushes a marker to the clusterer.
*
* @param {google.maps.Marker} marker The marker to add.
* @private
*/
MarkerClusterer.prototype.pushMarkerTo_ = function(marker) {
marker.isAdded = false;
if (marker['draggable']) {
// If the marker is draggable add a listener so we update the clusters on
// the drag end.
var that = this;
google.maps.event.addListener(marker, 'dragend', function() {
marker.isAdded = false;
that.repaint();
});
}
this.markers_.push(marker);
};
/**
* Adds a marker to the clusterer and redraws if needed.
*
* @param {google.maps.Marker} marker The marker to add.
* @param {boolean=} opt_nodraw Whether to redraw the clusters.
*/
MarkerClusterer.prototype.addMarker = function(marker, opt_nodraw) {
this.pushMarkerTo_(marker);
if (!opt_nodraw) {
this.redraw();
}
};
/**
* Removes a marker and returns true if removed, false if not
*
* @param {google.maps.Marker} marker The marker to remove
* @return {boolean} Whether the marker was removed or not
* @private
*/
MarkerClusterer.prototype.removeMarker_ = function(marker) {
var index = -1;
if (this.markers_.indexOf) {
index = this.markers_.indexOf(marker);
} else {
for (var i = 0, m; m = this.markers_[i]; i++) {
if (m == marker) {
index = i;
break;
}
}
}
if (index == -1) {
// Marker is not in our list of markers.
return false;
}
marker.setMap(null);
this.markers_.splice(index, 1);
return true;
};
/**
* Remove a marker from the cluster.
*
* @param {google.maps.Marker} marker The marker to remove.
* @param {boolean=} opt_nodraw Optional boolean to force no redraw.
* @return {boolean} True if the marker was removed.
*/
MarkerClusterer.prototype.removeMarker = function(marker, opt_nodraw) {
var removed = this.removeMarker_(marker);
if (!opt_nodraw && removed) {
this.resetViewport();
this.redraw();
return true;
} else {
return false;
}
};
/**
* Removes an array of markers from the cluster.
*
* @param {Array.} markers The markers to remove.
* @param {boolean=} opt_nodraw Optional boolean to force no redraw.
*/
MarkerClusterer.prototype.removeMarkers = function(markers, opt_nodraw) {
var removed = false;
for (var i = 0, marker; marker = markers[i]; i++) {
var r = this.removeMarker_(marker);
removed = removed || r;
}
if (!opt_nodraw && removed) {
this.resetViewport();
this.redraw();
return true;
}
};
/**
* Sets the clusterer's ready state.
*
* @param {boolean} ready The state.
* @private
*/
MarkerClusterer.prototype.setReady_ = function(ready) {
if (!this.ready_) {
this.ready_ = ready;
this.createClusters_();
}
};
/**
* Returns the number of clusters in the clusterer.
*
* @return {number} The number of clusters.
*/
MarkerClusterer.prototype.getTotalClusters = function() {
return this.clusters_.length;
};
/**
* Returns the google map that the clusterer is associated with.
*
* @return {google.maps.Map} The map.
*/
MarkerClusterer.prototype.getMap = function() {
return this.map_;
};
/**
* Sets the google map that the clusterer is associated with.
*
* @param {google.maps.Map} map The map.
*/
MarkerClusterer.prototype.setMap = function(map) {
this.map_ = map;
};
/**
* Returns the size of the grid.
*
* @return {number} The grid size.
*/
MarkerClusterer.prototype.getGridSize = function() {
return this.gridSize_;
};
/**
* Sets the size of the grid.
*
* @param {number} size The grid size.
*/
MarkerClusterer.prototype.setGridSize = function(size) {
this.gridSize_ = size;
};
/**
* Returns the min cluster size.
*
* @return {number} The grid size.
*/
MarkerClusterer.prototype.getMinClusterSize = function() {
return this.minClusterSize_;
};
/**
* Sets the min cluster size.
*
* @param {number} size The grid size.
*/
MarkerClusterer.prototype.setMinClusterSize = function(size) {
this.minClusterSize_ = size;
};
/**
* Extends a bounds object by the grid size.
*
* @param {google.maps.LatLngBounds} bounds The bounds to extend.
* @return {google.maps.LatLngBounds} The extended bounds.
*/
MarkerClusterer.prototype.getExtendedBounds = function(bounds) {
var projection = this.getProjection();
// Turn the bounds into latlng.
var tr = new google.maps.LatLng(bounds.getNorthEast().lat(),
bounds.getNorthEast().lng());
var bl = new google.maps.LatLng(bounds.getSouthWest().lat(),
bounds.getSouthWest().lng());
// Convert the points to pixels and the extend out by the grid size.
var trPix = projection.fromLatLngToDivPixel(tr);
trPix.x += this.gridSize_;
trPix.y -= this.gridSize_;
var blPix = projection.fromLatLngToDivPixel(bl);
blPix.x -= this.gridSize_;
blPix.y += this.gridSize_;
// Convert the pixel points back to LatLng
var ne = projection.fromDivPixelToLatLng(trPix);
var sw = projection.fromDivPixelToLatLng(blPix);
// Extend the bounds to contain the new bounds.
bounds.extend(ne);
bounds.extend(sw);
return bounds;
};
/**
* Determins if a marker is contained in a bounds.
*
* @param {google.maps.Marker} marker The marker to check.
* @param {google.maps.LatLngBounds} bounds The bounds to check against.
* @return {boolean} True if the marker is in the bounds.
* @private
*/
MarkerClusterer.prototype.isMarkerInBounds_ = function(marker, bounds) {
return bounds.contains(marker.getPosition());
};
/**
* Clears all clusters and markers from the clusterer.
*/
MarkerClusterer.prototype.clearMarkers = function() {
this.resetViewport(true);
// Set the markers a empty array.
this.markers_ = [];
};
/**
* Clears all existing clusters and recreates them.
* @param {boolean} opt_hide To also hide the marker.
*/
MarkerClusterer.prototype.resetViewport = function(opt_hide) {
// Remove all the clusters
for (var i = 0, cluster; cluster = this.clusters_[i]; i++) {
cluster.remove();
}
// Reset the markers to not be added and to be invisible.
for (var i = 0, marker; marker = this.markers_[i]; i++) {
marker.isAdded = false;
if (opt_hide) {
marker.setMap(null);
}
}
this.clusters_ = [];
};
/**
*
*/
MarkerClusterer.prototype.repaint = function() {
var oldClusters = this.clusters_.slice();
this.clusters_.length = 0;
this.resetViewport();
this.redraw();
// Remove the old clusters.
// Do it in a timeout so the other clusters have been drawn first.
window.setTimeout(function() {
for (var i = 0, cluster; cluster = oldClusters[i]; i++) {
cluster.remove();
}
}, 0);
};
/**
* Redraws the clusters.
*/
MarkerClusterer.prototype.redraw = function() {
this.createClusters_();
};
/**
* Calculates the distance between two latlng locations in km.
* @see http://www.movable-type.co.uk/scripts/latlong.html
*
* @param {google.maps.LatLng} p1 The first lat lng point.
* @param {google.maps.LatLng} p2 The second lat lng point.
* @return {number} The distance between the two points in km.
* @private
*/
MarkerClusterer.prototype.distanceBetweenPoints_ = function(p1, p2) {
if (!p1 || !p2) {
return 0;
}
var R = 6371; // Radius of the Earth in km
var dLat = (p2.lat() - p1.lat()) * Math.PI / 180;
var dLon = (p2.lng() - p1.lng()) * Math.PI / 180;
var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) *
Math.sin(dLon / 2) * Math.sin(dLon / 2);
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
var d = R * c;
return d;
};
/**
* Add a marker to a cluster, or creates a new cluster.
*
* @param {google.maps.Marker} marker The marker to add.
* @private
*/
MarkerClusterer.prototype.addToClosestCluster_ = function(marker) {
var distance = 40000; // Some large number
var clusterToAddTo = null;
var pos = marker.getPosition();
for (var i = 0, cluster; cluster = this.clusters_[i]; i++) {
var center = cluster.getCenter();
if (center) {
var d = this.distanceBetweenPoints_(center, marker.getPosition());
if (d < distance) {
distance = d;
clusterToAddTo = cluster;
}
}
}
if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {
clusterToAddTo.addMarker(marker);
} else {
var cluster = new Cluster(this);
cluster.addMarker(marker);
this.clusters_.push(cluster);
}
};
/**
* Creates the clusters.
*
* @private
*/
MarkerClusterer.prototype.createClusters_ = function() {
if (!this.ready_) {
return;
}
// Get our current map view bounds.
// Create a new bounds object so we don't affect the map.
var mapBounds = new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),
this.map_.getBounds().getNorthEast());
var bounds = this.getExtendedBounds(mapBounds);
for (var i = 0, marker; marker = this.markers_[i]; i++) {
if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) {
this.addToClosestCluster_(marker);
}
}
};
/**
* A cluster that contains markers.
*
* @param {MarkerClusterer} markerClusterer The markerclusterer that this
* cluster is associated with.
* @constructor
* @ignore
*/
function Cluster(markerClusterer) {
this.markerClusterer_ = markerClusterer;
this.map_ = markerClusterer.getMap();
this.gridSize_ = markerClusterer.getGridSize();
this.minClusterSize_ = markerClusterer.getMinClusterSize();
this.averageCenter_ = markerClusterer.isAverageCenter();
this.center_ = null;
this.markers_ = [];
this.bounds_ = null;
this.clusterIcon_ = new ClusterIcon(this, markerClusterer.getStyles(),
markerClusterer.getGridSize());
}
/**
* Determins if a marker is already added to the cluster.
*
* @param {google.maps.Marker} marker The marker to check.
* @return {boolean} True if the marker is already added.
*/
Cluster.prototype.isMarkerAlreadyAdded = function(marker) {
if (this.markers_.indexOf) {
return this.markers_.indexOf(marker) != -1;
} else {
for (var i = 0, m; m = this.markers_[i]; i++) {
if (m == marker) {
return true;
}
}
}
return false;
};
/**
* Add a marker the cluster.
*
* @param {google.maps.Marker} marker The marker to add.
* @return {boolean} True if the marker was added.
*/
Cluster.prototype.addMarker = function(marker) {
if (this.isMarkerAlreadyAdded(marker)) {
return false;
}
if (!this.center_) {
this.center_ = marker.getPosition();
this.calculateBounds_();
} else {
if (this.averageCenter_) {
var l = this.markers_.length + 1;
var lat = (this.center_.lat() * (l-1) + marker.getPosition().lat()) / l;
var lng = (this.center_.lng() * (l-1) + marker.getPosition().lng()) / l;
this.center_ = new google.maps.LatLng(lat, lng);
this.calculateBounds_();
}
}
marker.isAdded = true;
this.markers_.push(marker);
var len = this.markers_.length;
if (len < this.minClusterSize_ && marker.getMap() != this.map_) {
// Min cluster size not reached so show the marker.
marker.setMap(this.map_);
}
if (len == this.minClusterSize_) {
// Hide the markers that were showing.
for (var i = 0; i < len; i++) {
this.markers_[i].setMap(null);
}
}
if (len >= this.minClusterSize_) {
marker.setMap(null);
}
this.updateIcon();
return true;
};
/**
* Returns the marker clusterer that the cluster is associated with.
*
* @return {MarkerClusterer} The associated marker clusterer.
*/
Cluster.prototype.getMarkerClusterer = function() {
return this.markerClusterer_;
};
/**
* Returns the bounds of the cluster.
*
* @return {google.maps.LatLngBounds} the cluster bounds.
*/
Cluster.prototype.getBounds = function() {
var bounds = new google.maps.LatLngBounds(this.center_, this.center_);
var markers = this.getMarkers();
for (var i = 0, marker; marker = markers[i]; i++) {
bounds.extend(marker.getPosition());
}
return bounds;
};
/**
* Removes the cluster
*/
Cluster.prototype.remove = function() {
this.clusterIcon_.remove();
this.markers_.length = 0;
delete this.markers_;
};
/**
* Returns the center of the cluster.
*
* @return {number} The cluster center.
*/
Cluster.prototype.getSize = function() {
return this.markers_.length;
};
/**
* Returns the center of the cluster.
*
* @return {Array.} The cluster center.
*/
Cluster.prototype.getMarkers = function() {
return this.markers_;
};
/**
* Returns the center of the cluster.
*
* @return {google.maps.LatLng} The cluster center.
*/
Cluster.prototype.getCenter = function() {
return this.center_;
};
/**
* Calculated the extended bounds of the cluster with the grid.
*
* @private
*/
Cluster.prototype.calculateBounds_ = function() {
var bounds = new google.maps.LatLngBounds(this.center_, this.center_);
this.bounds_ = this.markerClusterer_.getExtendedBounds(bounds);
};
/**
* Determines if a marker lies in the clusters bounds.
*
* @param {google.maps.Marker} marker The marker to check.
* @return {boolean} True if the marker lies in the bounds.
*/
Cluster.prototype.isMarkerInClusterBounds = function(marker) {
return this.bounds_.contains(marker.getPosition());
};
/**
* Returns the map that the cluster is associated with.
*
* @return {google.maps.Map} The map.
*/
Cluster.prototype.getMap = function() {
return this.map_;
};
/**
* Updates the cluster icon
*/
Cluster.prototype.updateIcon = function() {
var zoom = this.map_.getZoom();
var mz = this.markerClusterer_.getMaxZoom();
if (mz && zoom > mz) {
// The zoom is greater than our max zoom so show all the markers in cluster.
for (var i = 0, marker; marker = this.markers_[i]; i++) {
marker.setMap(this.map_);
}
return;
}
if (this.markers_.length < this.minClusterSize_) {
// Min cluster size not yet reached.
this.clusterIcon_.hide();
return;
}
var numStyles = this.markerClusterer_.getStyles().length;
var sums = this.markerClusterer_.getCalculator()(this.markers_, numStyles);
this.clusterIcon_.setCenter(this.center_);
this.clusterIcon_.setSums(sums);
this.clusterIcon_.show();
};
/**
* A cluster icon
*
* @param {Cluster} cluster The cluster to be associated with.
* @param {Object} styles An object that has style properties:
* 'url': (string) The image url.
* 'height': (number) The image height.
* 'width': (number) The image width.
* 'anchor': (Array) The anchor position of the label text.
* 'textColor': (string) The text color.
* 'textSize': (number) The text size.
* 'backgroundPosition: (string) The background postition x, y.
* @param {number=} opt_padding Optional padding to apply to the cluster icon.
* @constructor
* @extends google.maps.OverlayView
* @ignore
*/
function ClusterIcon(cluster, styles, opt_padding) {
cluster.getMarkerClusterer().extend(ClusterIcon, google.maps.OverlayView);
this.styles_ = styles;
this.padding_ = opt_padding || 0;
this.cluster_ = cluster;
this.center_ = null;
this.map_ = cluster.getMap();
this.div_ = null;
this.sums_ = null;
this.visible_ = false;
this.setMap(this.map_);
}
/**
* Triggers the clusterclick event and zoom's if the option is set.
*/
ClusterIcon.prototype.triggerClusterClick = function() {
var markerClusterer = this.cluster_.getMarkerClusterer();
// Trigger the clusterclick event.
google.maps.event.trigger(markerClusterer, 'clusterclick', this.cluster_);
if(g.data.clustering_click == "list"){
// show infowindow with marker content
cluster_infowindow=new google.maps.InfoWindow();
var markers = this.cluster_.getMarkers();
var html = '';
var marker_link = '';
var marker_icon = '';
var marker_title = '';
var marker_desc = '';
html += ''+ markers.length + ' markers';
html += '
';
crowdGetLocation_div.innerHTML=content;
if(true || g.data.crowdmap.mode=="edit" ){
if ( document.getElementById('gmap_'+g.data.fileid) ) {
var map_div = document.getElementById('gmap_'+g.data.fileid);
map_div.appendChild(crowdGetLocation_div);
}
}
}
}
g.removeLocationDiv=function(){
if(document.getElementById("crowdGetLocation_div")) {
var map_div = document.getElementById('gmap_'+g.data.fileid);
var cf = document.getElementById("crowdGetLocation_div");
map_div.removeChild(cf);
}
}
// show and hide temp marker
g.addLocationMode=function(){
document.getElementById('reportPanel').style.display="none";
g.removeModel();
g.addLocationDiv();
g.addLocationMarker();
}
g.comfirmLocation=function(){
g.createModel();
document.getElementById('reportPanel').style.display="block";
g.removeLocationMarker();
g.removeLocationDiv();
}
// message dialog
g.showMessage=function(message, bgcolor, fontColor){
if(document.getElementById("errorMessage_div")){
}else{
errorMessage_div=document.createElement("div");
errorMessage_div.id="errorMessage_div";
errorMessage_div.style.position="absolute";
errorMessage_div.style.bottom="20px";
errorMessage_div.style.left="30%";
errorMessage_div.style.right="30%";
errorMessage_div.style.display='block';
errorMessage_div.style.zIndex="3";
errorMessage_div.style.opacity="1";
errorMessage_div.align="center";
var ci_style="";
var content="";
content+='
'+
'
'+message+'
'+
'
';
errorMessage_div.innerHTML=content;
if(true || g.data.crowdmap.mode=="edit" ){
if ( document.getElementById('gmap_'+g.data.fileid) ) {
var map_div = document.getElementById('gmap_'+g.data.fileid);
map_div.appendChild(errorMessage_div);
}
}
setTimeout('net.imapbuilder.gmap.removeMessageDiv()', 3000);
}
}
g.removeMessageDiv=function(){
if(document.getElementById("errorMessage_div")) {
var map_div = document.getElementById('gmap_'+g.data.fileid);
var cf = document.getElementById("errorMessage_div");
map_div.removeChild(cf);
}
}
// function for data list scroll to bottom
/*
g.scrollDataListToBottom=function(){
if(document.getElementById('dataListContainer')!=undefined ) {
var objDiv = document.getElementById('dataListContainer');
objDiv.scrollTop = objDiv.scrollHeight;
}
}
*/
g.refreshPage=function(){
window.location.reload();
return false;
}
// heat map
g.checkHeatMap=function(){
heatMapArr = [];
// check if it is heatmap
if( g.data.heatmap != undefined && g.data.heatmap.enable == true ){
var heatMapData = g.data.heatmap.data;
for(var i=0; i=0;i--){
if(str.charAt(i)!=" "&&str.charAt(i)!=" ") break;
}
str = str.substring(0,i+1);
return str;
}
g.Trim=function(str){
return g.LTrim(g.RTrim(str));
}
g.numToHex=function(num){
var hex = num.toString(16);
if( hex.length == 1 )
return "0"+hex;
else
return hex;
}
var searchMarker = [];
g.searchInMapAction=function(address){
if(address != " "){
map_geocoder=new google.maps.Geocoder();
var map_bound_SW = new google.maps.LatLng(-32.768800, -86.923828);
var map_bound_NE = new google.maps.LatLng(9.188870, -16.611328);
var map_bound = new google.maps.LatLngBounds(map_bound_SW, map_bound_NE);
map_geocoder.geocode({'address':address +" Bazil", 'bounds':map_bound},function(results,status){
if(status==google.maps.GeocoderStatus.OK){
map.setCenter(results[0].geometry.location);
//searchInMapAddMarker(results[0].geometry.location, results[0].formatted_address, searchMarkerID);
searchMarker[searchMarkerID] = new google.maps.Marker({
map: map,
animation: google.maps.Animation.DROP,
position: results[0].geometry.location,
icon: {url:'http://g3.imapbuilder.net/_api/img/marker/17',size:new google.maps.Size(35,35),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(17.5,35)},
title: results[0].formatted_address
});
google.maps.event.addListener(searchMarker[searchMarkerID], 'click',function(event){
var infowindow = new google.maps.InfoWindow({content:results[0].formatted_address,position:event.latLng});
infowindow.open(map);
});
searchMarkerID++
}
});
}
}
g.zoomInPolygonCenter=function(path){
var bounds = new google.maps.LatLngBounds();
var pglength = path.getLength();
for (i = 0; i < pglength; i++) {
bounds.extend(path.getAt(i));
}
map.fitBounds(bounds);
}
g.zoomInPolygon=function(polygonID){
if(polygons[polygonID] != undefined){
g.zoomInPolygonCenter(polygons[polygonID].getPath());
}
}
})();net.imapbuilder.gmap.expire=true;net.imapbuilder.gmap.mapkey="AIzaSyBsJ00itihfix0LqWl2nQ86J5AYBQK_XQg";net.imapbuilder.gmap.run("{\"width\":\"890\",\"width_unit\":\"px\",\"height\":\"700\",\"height_unit\":\"px\",\"fileid\":3116,\"filename\":\"odb\",\"options\":{\"mapTypeId\":\"roadmap\",\"disableDoubleClickZoom\":false,\"draggable\":true,\"keyboardShortcuts\":true,\"scrollwheel\":true,\"mapTypeControl\":true,\"panControl\":true,\"scaleControl\":true,\"streetViewControl\":true,\"zoomControl\":true,\"center\":[55.0335760526661,-59.66158508985726],\"zoom\":4,\"infoAutoPan\":false},\"markers\":[{\"iconid\":\"1\",\"options\":{\"position\":[47.75676439999999,-122.28096019999998],\"visible\":true,\"title\":\"Third Place Books\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"Third Place Books \\n 17171 Bothell Way NE \\n Lake Forest Park, WA 98155 \\n \\n Contact: \\n Vladimir Verano \\n press@thirdplacebooks.com \\n \\n Self-Publishing Details: \\n www.thirdplacepress.com or \\n press@thirdplacebooks.com\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.thirdplacepress.com\",\"target\":\"_blank\"}}},\"catID\":-1},{\"iconid\":\"1\",\"options\":{\"position\":[42.3725941,-71.11631740000001],\"visible\":true,\"title\":\"Harvard Book Store\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"Harvard Book Store \\n1256 Massachusetts Ave. Cambridge, MA 02138 Email: bookmachine@harvard.com\\n
\\nIndependent Booksellers Since 1932\\n\\n\",\"maxWidth\":\"0\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.harvard.com/clubs_services/custom_printing/\",\"target\":\"_blank\"}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[38.581604,-121.49486300000001],\"visible\":true,\"title\":\"I Street Press-Sacramento Public Library\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"I Street Press-Sacramento Public Library \\n 828 I St. \\n Sacramento, CA 95814 Services Offered: \\n Printing for self-publishing \\n On Demand Books database printing \\n Self-publishing consultations Contact: \\n Manya Shorr \\n Outreach & Community Services Supervisor \\n Sacramento Public Library \\n 828 I St. \\n Sacramento, CA 95814 Email: istreet@saclibrary.org \",\"maxWidth\":\"0\"}}},\"click\":{\"navigate\":{\"href\":\" http://www.saclibrary.org/Services/I-Street-Press/\",\"target\":\"_blank\"}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[42.73109059999999,-84.48373199999997],\"visible\":true,\"title\":\"Michigan State University\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"Michigan State University Library \\n366 W. Circle Drive, Copy Center \\nEast Lansing, MI 48824 \\n\\n\\n Phone: 517.884.0827 Email: ebm@mail.lib.msu.edu\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.lib.msu.edu/about/ebm/index.jsp\",\"target\":\"_blank\"}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[44.4183689,-72.0156096],\"visible\":true,\"title\":\"Boxcar and Caboose\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"\\nBoxcar and Caboose \\n394 Railroad St., Ste. 2 \\nSt. Johnsbury, VT 05819
\\n\\nContact: \\nScott L. Beck \\nPhone: 802-274-0201
\\n\\nServices Offered: \\nBook Publishing \\nBook Printing \\nBook Design \\nCover Design \\nEditing \"}}},\"click\":{\"navigate\":{\"href\":\"http://www.railroadstreetpress.com/\",\"target\":\"_blank\"}}},\"catID\":-1},{\"iconid\":\"1\",\"options\":{\"position\":[49.8571676,-97.16556129999998],\"visible\":true,\"title\":\"McNally Robinson\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"McNally Robinson \\n1120 Grant Avenue Winnipeg MB R3M 2A6 Canada Phone 204-475-0483 Toll Free: 1-800-561-1833\\n\\n\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.mcnallyrobinson.com/home\",\"target\":\"_blank\"}}},\"catID\":-1},{\"iconid\":\"1\",\"options\":{\"position\":[14.5995124,120.9842195],\"visible\":true,\"title\":\"Asian Development Bank Bookstore \"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\" Asian Development Bank Bookstore \\n Manila Philippines \\n\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.booksondemand.com.ph/\",\"target\":\"_blank\"}}},\"catID\":-1},{\"iconid\":\"1\",\"options\":{\"position\":[35.6894875,139.69170639999993],\"visible\":true,\"title\":\"Books Sanseido\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"Books Sanseido 2 Locations \\n Tokyo Japan \\n\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.books-sanseido.co.jp/\",\"target\":\"_blank\"}}},\"catID\":-1},{\"iconid\":\"1\",\"options\":{\"position\":[24.4666667,54.366666699999996],\"visible\":true,\"title\":\"Abu Dhabi National Library \"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"Abu Dhabi National Library \\n Abu Dhabi United Arab Emirates\\n\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.abudhabi.ae/egovPoolPortal_WAR/appmanager/ADeGP/Citizen?_nfpb=true&_pageLabel=p10\",\"target\":\"_blank\"}}},\"catID\":-1},{\"iconid\":\"1\",\"options\":{\"position\":[31.2455729,29.99930859999995],\"visible\":true,\"title\":\"Library of Alexandria \"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"Library of Alexandria 3 Locations Alexandria, Egypt\\n\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.bibalex.org/Home/Default_EN.aspx\",\"target\":\"_blank\"}}},\"catID\":-1},{\"iconid\":\"1\",\"options\":{\"position\":[52.0789498,4.31515730000001],\"visible\":true,\"title\":\"American Book Center\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"American Book Center \\n Lange Poten 23 \\n 2511 CM Den Haag \\n The Netherlands\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.abc.nl/frontpage/ebm/index.php?pod=Y\",\"target\":\"_blank\"}}},\"catID\":-1},{\"iconid\":\"1\",\"options\":{\"position\":[52.368883,4.889538399999992],\"visible\":true,\"title\":\"American Book Center \"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"American Book Center \\n Spui 12 \\n 1012 XA Amsterdam \\n The Netherlands\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.abc.nl/frontpage/ebm/index.php?pod=Y\",\"target\":\"_blank\"}}},\"catID\":-1},{\"iconid\":\"1\",\"options\":{\"position\":[46.25770139999999,-63.14138890000004],\"visible\":true,\"title\":\"University of Prince Edward Island Library\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"University of Prince Edward Island Library \\n 550 University Avenue Charlottetown, PE Canada C1A 4P3\"}}},\"click\":{\"navigate\":{\"href\":\"http://library.upei.ca/\",\"target\":\"_blank\"}}},\"catID\":-1},{\"iconid\":\"1\",\"options\":{\"position\":[43.653226,-79.38318429999998],\"visible\":true,\"title\":\"University of Toronto Bookstore\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"University of Toronto Bookstore\\n \\n Toronto, ON \\n \\n Canada\\n \\n\\n\",\"maxWidth\":\"0\"}}},\"click\":{\"navigate\":{\"href\":\"http://bookpod.uoftbookstore.com/\",\"target\":\"_blank\"}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[18.5,-69.98333330000003],\"visible\":true,\"title\":\"Juan Bosch Library\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"\\n\\n\\n\\n
Juan Bosch Library
\\n\\n
Santo Domingo, Dominican Republic
\\n\\n\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.bibliotecajb.org/\",\"target\":\"_blank\"}}},\"catID\":-1},{\"iconid\":\"1\",\"options\":{\"position\":[34.2042386,-118.2000759],\"visible\":true,\"title\":\"Flintridge Bookstore & Coffeehouse \"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\" Flintridge Bookstore & Coffeehouse \\n 1010 Foothill Blvd. \\n La Cañada Flintridge, CA 91011\",\"maxWidth\":\"0\"}}},\"click\":{\"navigate\":{\"href\":\"https://www.flintridgebooks.com/selfpublishing\",\"target\":\"_blank\"}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[40.723584,-73.99611700000003],\"visible\":true,\"title\":\"McNally Jackson Bookstore\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\" McNally Jackson Bookstore \\n 52 Prince Street \\n New York, NY 10012 \\n Phone: 212-274-1160\",\"maxWidth\":\"0\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.mcnallyjackson.com/print-on-demand\",\"target\":\"_blank\"}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[30.286183,-97.743087],\"visible\":true,\"title\":\"University of Texas Co-Op Bookstore \"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"\\n\\n\\n\\n
\\n\\n\",\"maxWidth\":\"0\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.fortyacrespress.com/\",\"target\":\"_blank\"}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[40.4431434,-79.95629339999999],\"visible\":true,\"title\":\"University of Pittsburgh\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"University of Pittsburgh \\nThe University Store on Fifth\\n \\n 4000 Fifth Ave \\n Pittsburgh PA 15213\",\"maxWidth\":\"0\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.pittbookcenter.com/t-book-printing-services.aspx\",\"target\":\"_blank\"}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[46.8771863,-96.78980339999998],\"visible\":true,\"title\":\"North Dakota State University Bookstore\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"North Dakota State University Bookstore \\n Fargo, ND\\n\\n\",\"maxWidth\":\"0\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.ndsubookstore.com/SiteText.aspx?id=13720\",\"target\":\"_blank\"}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[42.911444,-85.60141899999996],\"visible\":true,\"title\":\"Schuler Books & Music\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"Schuler Books & Music \\n 2660 28th Street SE \\n Grand Rapids, MI 49512 \\n Phone: 616 942 2561 \\n Fax: 616 942 9238 \\n Email: info@schulerbooks.com \\n Manager: Tim@schulerbooks.com\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.schulerbooks.com/schuler-books-presents-espresso-book-machine\",\"target\":\"_blank\"}}},\"catID\":-1},{\"iconid\":\"1\",\"options\":{\"position\":[32.2217429,-110.92647899999997],\"visible\":true,\"title\":\"University of Arizona\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"University of Arizona \\nTuscon, AZ \",\"maxWidth\":\"0\"}}},\"click\":{\"navigate\":{\"href\":\"http://uabookstores.arizona.edu/ebm/\",\"target\":\"_blank\"}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[40.66917969207038,-111.90203372812499],\"visible\":true,\"title\":\"Brigham Young University\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"Brigham Young University \\nY Mountain Press \\nSalt Lake City, UT\",\"maxWidth\":\"0\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.byubookstore.com/ePOS?this_category=858&store=439&form=shared3%2fgm%2fmain.html&design=439\",\"target\":\"_blank\"}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[23.90544082874385,54.322721387499996],\"visible\":true,\"title\":\"New York University\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"New York University Abu Dhabi Library \\nBox 129188 \\nAbu Dhabi, \\nUnited Arab Emirates \\nPhone: +971 2 628 5544\"}}},\"click\":{\"navigate\":{\"href\":\"http://nyuad.nyu.edu/academics/library/index.html\",\"target\":\"_blank\"}}},\"catID\":-1},{\"iconid\":\"1\",\"options\":{\"position\":[34.0355195,-84.5820665],\"visible\":true,\"title\":\"Kennesaw State University\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"Kennesaw State University \\n1000 Chastain Road \\nKennesaw, GA 30144 \\nPhone: (770) 423-6000\",\"maxWidth\":\"0\"}}},\"click\":{\"navigate\":{\"href\":\" http://bookstore.kennesaw.edu/SiteText.aspx?id=24137\",\"target\":\"_blank\"}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[43.4648808,-80.54180150000002],\"visible\":true,\"title\":\"University of Waterloo Bookstore\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"University of Waterloo Bookstore 200 University Avenue West Waterloo, Ontario, Canada N2L 3G1 \\nPhone: 519 888 4673\",\"maxWidth\":\"0\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.bookstore.uwaterloo.ca/printondemand.html\",\"target\":\"_blank\"}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[38.945004,-92.351631],\"visible\":true,\"title\":\"University of Missouri\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"The Mizzou Store \\n911 E. Rollins \\nColumbia, MO 65211 \\n573.882.8567\\n\",\"maxWidth\":\"0\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.mubookstore.com/t-Espresso-About.aspx?skinid=2\",\"target\":\"_blank\"}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[35.7877834,-78.67057699999998],\"visible\":true,\"title\":\" Wolf Xpress - NC State Bookstore\"},\"event\":{\"mouseover\":{\"infoWindow\":{\"options\":{\"content\":\"NC State Bookstore \\n Wolf Xpress \\n NC State Bookstores \\n Campus Box 8116 \\n Raleigh, NC 27695 \\n Phone: 919-515-2131 \\n Fax: 919-515-7272 \\n Main Email: wolfxpress@ncsu.ed\"}}},\"click\":{\"navigate\":{\"href\":\"http://www.ncsu.edu/bookstore\",\"target\":\"_blank\"}}},\"catID\":-1},{\"iconid\":\"1\",\"options\":{\"position\":[-26.2041028,28.047305100000017],\"visible\":true,\"title\":\"University of Johannesburg\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://www.uj.ac.za/EN/Newsroom/News/Pages/The-Espresso-Book-Machine-has-arrived-in-South-Africa.aspx\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\"University of Johannesburg \\nJohannesburg, South Africa\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[64.82799159999999,-147.81255220000003],\"visible\":true,\"title\":\"University of Alaska\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"https://www.crcd-gotbooks.com/\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\"University of Alaska 2175 University Ave South, Suite 104 \\nFairbanks, AK 99775
\\n\\nContact: \\nMain line: 907.474.7711 \\nToll-Free: 1.877.651.4002 \\nFax: 907.474.7742\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[49.2799367,-122.91995580000003],\"visible\":true,\"title\":\"Simon Fraser University\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://sfu.collegestoreonline.com/\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\"Simon Fraser University \\n8888 University Drive \\nBurnaby, B.C. V5A 1S6 \\nCanada\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[42.3110873,-83.03485920000003],\"visible\":true,\"title\":\"Windsor Public Library\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://www.windsorpubliclibrary.com/?portfolio=self-publishing\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\"Windsor Public Library \\n850 Ouellette Avenue \\nWindsor, ON \\n519-255-6770 Ext. 4603 \\nEmail: xpress@windsorpubliclibrary.com\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[42.4475062,-76.48485929999998],\"visible\":true,\"title\":\"The Cornell Store\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://cornell.indiebound.com/self-publishing-espresso-book-machine\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\"The Cornell Store \\n135 Ho Plaza \\nIthaca, NY 14853 \\n607-255-8568\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[38.8987291,-77.02477829999998],\"visible\":true,\"title\":\"District of Columbia Public Library\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://dclibrary.org/digitalcommons/ebm\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\"District of Columbia Public Library \\n901 G Street NW \\nWashington, DC 20001 \\n202-727-0321 \\n \",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[38.3255011,-75.2205626],\"visible\":true,\"title\":\"Salt Water Media LLC\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://www.saltwatermediallc.com\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\"\\nSaltwater Media LLC \\n29 Broad Street, Suite 104 \\nBerlin, MD 21811 \\n443-513-4422 \\nwww.saltwatermediallc.com\\n\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[45.945981,-66.64192379999997],\"visible\":true,\"title\":\"University of New Brunswick Libraries\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://lib.unb.ca/express\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\"University of New Brunswick Libraries \\nHarriet Irving Library 5 Macauly Lane \\nFredericton, New Brunswick \\nE3B 5H5 \\nEmail: express@unb.ca \\nWebsite: http://lib.unb.ca/express\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[53.5433301,-113.4897464],\"visible\":true,\"title\":\"Edmonton Public Library Makerspace\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://www.epl.ca/makerspace\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\"Edmonton Public Library Makerspace\\n \\nStanley A. Milner Library \\n #7 Sir Winston Churchill Square \\nEdmonton Alberta, Canada \\nT5J2V4 \\n780-944-5342 \\nEmail: makerspace@epl.ca \\nWebsite: www.epl.ca/makerspace\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[39.253636,-94.46791100000002],\"visible\":true,\"title\":\"Woodneath Library Center/Mid-Continent Public Library\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://www.mymcpl.org/about-us/woodneath-press\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\"\\nWoodneath Library Center \\nMid-Continent Public Library\\n \\n8900 NE Flintlock Road \\nKansas City, MO 64157 \\n816-883-4900 \\nEmail: woodneathpress@mymcpl.org \\n\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[40.7370214,-73.98960260000001],\"visible\":true,\"title\":\"Barnes & Noble\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://www.bn.com/printondemand\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\"Barnes & Noble \\n33 East 17th Street \\nNew York, NY 10003 \\n212-253-0810 \\nwww.bn.com/printondemand\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[43.6717923,-79.3868129],\"visible\":true,\"title\":\"Toronto Public Library\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://www.torontopubliclibrary.ca/using-the-library/computer-services/book-printing-service/\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\"Toronto Public Library\\n \\n789 Yonge St \\nToronto ON, M4W 2G8 \\n416-393-7007 \\nWebsite\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[48.830117,2.35092480000003],\"visible\":true,\"title\":\"Estienne Graphic & Printing School\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://www.ecole-estienne.paris/\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\"Estienne Graphic & Printing School \\n 18 Boulevard Auguste Blanqui \\n 75013 Paris \\n France \\n Website \\n Email: hubert@neomedias.com \\n Phone: +33 623 77 29 61\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[45.7457404,4.876989299999991],\"visible\":true,\"title\":\"SEPR Graphic & Printing School\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://www.sepr.edu\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\" SEPR Graphic & Printing School \\n 46 rue Professeur Rochaix \\n 69003 Lyon \\n France \\n Website \\n Email: hubert@neomedias.com \\n Phone: +33 623 77 29 61\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[47.3938414,0.6714015000000018],\"visible\":true,\"title\":\"Bayet/Cartif Graphic & Printing School\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://lyc-albert-bayet-tours.tice.ac-orleans-tours.fr/php5/lycee_bayet_industries_graphique.html\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\"Bayet/Cartif Graphic & Printing School \\n 9 Rue du Commandant Bourgoin \\n \\n 37058 Tours \\n \\n France \\n \\n Website \\n Email: hubert@neomedias.com \\n Phone: +33 623 77 29 61\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[50.6130448,3.067918700000064],\"visible\":true,\"title\":\"Amigraf Graphic & Printing School\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://www.amigraf.com\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\"Amigraf Graphic & Printing School \\n 92 Rue Abélard \\n 59000 Lille \\n France \\n Website \\n Email: hubert@neomedias.com \\n Phone: +33 623 77 29 61\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[45.663854,0.19919200000003912],\"visible\":true,\"title\":\"CIFOP Graphic & Printing School\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://www.cifop.fr/\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\" CIFOP Graphic & Printing School \\n Boulevard Salvator Allende, ZI n°3 \\n \\n 16340 L’ISLE D’ESPAGNAC \\n \\n France \\n \\n Website \\n Email: hubert@neomedias.com \\n Phone: +33 623 77 29 61\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[48.5295707,7.72702490000006],\"visible\":true,\"title\":\"Gutenberg Graphic & Printing School\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://www.lyceegutenberg.net/nos-formations/\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\"Gutenberg Graphic & Printing School \\n22 rue Lixenbuhl \\n\\n67400 ILLKIRCH \\n\\nFrance \\n\\nWebsite \\nEmail: hubert@neomedias.com \\n Phone: +33 623 77 29 61\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[45.4642144,9.188654499999984],\"visible\":true,\"title\":\"Mondadori Megastore Duomo\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://www.mondadoristore.it/book-on-demand/\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\"Mondadori Megastore Duomo \\n Piazza Duomo, 1 \\n\\nMilano \\n\\nItaly \\nWebsite \\nEmail\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[40.7681457,-73.96344650000003],\"visible\":true,\"title\":\" Shakespeare & Co.\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"http://www.shakeandco.com/shake_trade/print_in_store.php\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\" Shakespeare & Co \\n 939 Lexington Avenue New York, NY 10065 \\n Website\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"},{\"iconid\":\"1\",\"options\":{\"position\":[42.3657736,-71.07703200000003],\"visible\":true,\"title\":\"The MIT Press\"},\"event\":{\"click\":{\"navigate\":{\"href\":\"https://mitpress.mit.edu/\",\"target\":\"_blank\"},\"infoWindow\":{\"options\":{\"content\":\"The MIT Press \\nOne Rogers Street \\nCambridge, MA 02142\",\"maxWidth\":\"0\"}}}},\"catID\":\"-1\"}],\"polylines\":[],\"polygons\":[],\"rectangles\":[],\"circles\":[],\"savetime\":\"2020-8-8 21:1:20\",\"labels\":[],\"images\":[null],\"kmlfiles\":[],\"routes\":[],\"catlegendenable\":true,\"catlegend\":[],\"legends\":[],\"font_size\":\"16\",\"font_family\":\"Times New Roman\",\"clustering\":false,\"clustering_gridsize\":\"50\",\"clustering_maxzoom\":\"12\",\"datalist\":{\"position\":\"1\",\"width\":250,\"height\":300,\"showmarkers\":-1}}");
// test 3 0000-00-00 00:00:00 8383
// qoute test 0 0