fixed timing issue in map js
This commit is contained in:
parent
5f848c825e
commit
4a7b2ee3db
1 changed files with 8 additions and 7 deletions
|
@ -12,7 +12,7 @@ $(document).ready(function(){
|
||||||
$.extend(this, i18nStrings);
|
$.extend(this, i18nStrings);
|
||||||
|
|
||||||
getGeoFocusResearcherCount();
|
getGeoFocusResearcherCount();
|
||||||
getGeoJsonForMaps();
|
|
||||||
|
|
||||||
$('a#globalLink').click(function() {
|
$('a#globalLink').click(function() {
|
||||||
buildGlobalMap();
|
buildGlobalMap();
|
||||||
|
@ -37,14 +37,14 @@ $(document).ready(function(){
|
||||||
|
|
||||||
function getLatLong(localName,popup) {
|
function getLatLong(localName,popup) {
|
||||||
var lat = [];
|
var lat = [];
|
||||||
latLongJson.map(function (json) {
|
jQuery.map(latLongJson, function (json) {
|
||||||
if ( json.local == localName) {
|
if ( json.local == localName) {
|
||||||
lat.push(json.data["longitude"]);
|
lat.push(json.data["longitude"]);
|
||||||
lat.push(json.data["latitude"]);
|
lat.push(json.data["latitude"]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (lat.length == 0) {
|
if (lat.length == 0) {
|
||||||
latLongJson.map(function (json) {
|
jQuery.map(latLongJson, function (json) {
|
||||||
if ( json.name == popup) {
|
if ( json.name == popup) {
|
||||||
lat.push(json.data["longitude"]);
|
lat.push(json.data["longitude"]);
|
||||||
lat.push(json.data["latitude"]);
|
lat.push(json.data["latitude"]);
|
||||||
|
@ -60,13 +60,13 @@ $(document).ready(function(){
|
||||||
|
|
||||||
function getMapType(localName,popup) {
|
function getMapType(localName,popup) {
|
||||||
var mt = "";
|
var mt = "";
|
||||||
latLongJson.map(function (json) {
|
jQuery.map(latLongJson, function (json) {
|
||||||
if ( json.local == localName) {
|
if ( json.local == localName) {
|
||||||
mt = json.data["mapType"];
|
mt = json.data["mapType"];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if ( mt.length == 0 ) {
|
if ( mt.length == 0 ) {
|
||||||
latLongJson.map(function (json) {
|
jQuery.map(latLongJson, function (json) {
|
||||||
if ( json.name == popup) {
|
if ( json.name == popup) {
|
||||||
mt = json.data["mapType"];
|
mt = json.data["mapType"];
|
||||||
}
|
}
|
||||||
|
@ -77,13 +77,13 @@ $(document).ready(function(){
|
||||||
|
|
||||||
function getGeoClass(localName,popup) {
|
function getGeoClass(localName,popup) {
|
||||||
var gc = "";
|
var gc = "";
|
||||||
latLongJson.map(function (json) {
|
jQuery.map(latLongJson, function (json) {
|
||||||
if ( json.local == localName) {
|
if ( json.local == localName) {
|
||||||
gc = json.data["geoClass"];
|
gc = json.data["geoClass"];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if ( gc.length == 0 ) {
|
if ( gc.length == 0 ) {
|
||||||
latLongJson.map(function (json) {
|
jQuery.map(latLongJson, function (json) {
|
||||||
if ( json.name == popup) {
|
if ( json.name == popup) {
|
||||||
gc = json.data["geoClass"];
|
gc = json.data["geoClass"];
|
||||||
}
|
}
|
||||||
|
@ -404,6 +404,7 @@ $(document).ready(function(){
|
||||||
if ( results != null ) {
|
if ( results != null ) {
|
||||||
geoResearcherCount = results.count;
|
geoResearcherCount = results.count;
|
||||||
}
|
}
|
||||||
|
getGeoJsonForMaps();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue