Skip to content

Commit

Permalink
Dev: not leaflet, typeahead removing ...
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Dec 9, 2014
1 parent 86a2059 commit be6f696
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2,264 deletions.
9 changes: 9 additions & 0 deletions application/config/third_party.php
Expand Up @@ -223,4 +223,13 @@
'jqueryui'
)
),
'leaflet' => array(
'baseUrl' => 'third_party/leaflet/',
'js' => array(
'leaflet.js'
),
'css' => array(
'leaflet.css'
),
),
);
5 changes: 1 addition & 4 deletions application/helpers/qanda_helper.php
Expand Up @@ -3599,8 +3599,6 @@ class=\"mapservice\" value = \"{$aQuestionAttributes['location_mapservice']}\" >
$question_text['help'] = gT('Drag and drop the pin to the desired location. You may also right click on the map to move the pin.');
}
}
////----------------------------------------------------------------------------------- Leaflet Maps + geonames search

elseif((int)($aQuestionAttributes['location_mapservice'])==100){
$mapservice = $aQuestionAttributes['location_mapservice'];
$currentLocation = $_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$ia[1]];
Expand Down Expand Up @@ -3644,7 +3642,6 @@ class=\"mapservice\" value = \"{$aQuestionAttributes['location_mapservice']}\" >
$strBuild .= "5";

$currentLocation = $currentLatLong[0] . " " . $currentLatLong[1];
tracevar($currentLatLong);
$aGlobalMapScriptVar= array(
'geonameUser'=>getGlobalSetting('GeoNamesUsername'),// Did we need to urlencode ?
'geonameLang'=>Yii::app()->language,
Expand All @@ -3655,6 +3652,7 @@ class=\"mapservice\" value = \"{$aQuestionAttributes['location_mapservice']}\" >
'longitude'=>$currentLatLong[1],

);
App()->getClientScript()->registerPackage('leaflet');
Yii::app()->getClientScript()->registerScript('sGlobalMapScriptVar',"LSmap=".ls_json_encode($aGlobalMapScriptVar).";\nLSmaps= new Array();",CClientScript::POS_HEAD);
Yii::app()->getClientScript()->registerScript('sThisMapScriptVar'.$ia[1],"LSmaps['{$ia[1]}']=".ls_json_encode($aThisMapScriptVar),CClientScript::POS_HEAD);
Yii::app()->getClientScript()->registerScriptFile(Yii::app()->getConfig('generalscripts')."map.js");
Expand Down Expand Up @@ -3692,7 +3690,6 @@ class=\"mapservice\" value = \"{$aQuestionAttributes['location_mapservice']}\" >
. gT('Click to set the location or drag and drop the pin. You may may also enter coordinates').'</div>';
$question_text['help'] = gT('Click to set the location or drag and drop the pin. You may may also enter coordinates');
}
//----------------------------------------------------------------------------------- end leaflet+geonames
}
else
{
Expand Down

0 comments on commit be6f696

Please sign in to comment.