Changes in calculations of local coordinates for locations. Changes in display of lexem symbols and location names on the map.
This commit is contained in:
parent
4d53375e33
commit
c9b5700f50
|
@ -192,18 +192,18 @@ Class Home_model extends CI_Model {
|
||||||
{
|
{
|
||||||
//init
|
//init
|
||||||
//corners min, max in geo
|
//corners min, max in geo
|
||||||
$min_lat=46.996232;
|
$min_lat=46.979446;
|
||||||
$min_long=13.059296;
|
$min_long=13.138383;
|
||||||
$max_lat=45.400639;
|
$max_lat=45.395345;
|
||||||
$max_long=16.620767;
|
$max_long=16.698977;
|
||||||
|
|
||||||
//height,width of canvas
|
//height,width of canvas
|
||||||
$height=719; //719.964
|
$height=719.964;
|
||||||
$width=1111; //1111.625
|
$width=1111.625;
|
||||||
|
|
||||||
//error
|
//error
|
||||||
$height_err=0; //20
|
$height_err=10;
|
||||||
$width_err=30; //35
|
$width_err=10;
|
||||||
|
|
||||||
//calculate pixes per degree
|
//calculate pixes per degree
|
||||||
$ppd_height=number_format($height/($min_lat-$max_lat),6);
|
$ppd_height=number_format($height/($min_lat-$max_lat),6);
|
||||||
|
@ -214,15 +214,13 @@ Class Home_model extends CI_Model {
|
||||||
$delta_y=number_format(abs($min_lat-$lat),6);
|
$delta_y=number_format(abs($min_lat-$lat),6);
|
||||||
|
|
||||||
$x=(int)($delta_x*$ppd_width)-$width_err;
|
$x=(int)($delta_x*$ppd_width)-$width_err;
|
||||||
$y=(int)($delta_y*$ppd_height)-$height_err;
|
$y=(int)($delta_y*$ppd_height)+$height_err;
|
||||||
|
|
||||||
$result=array(
|
$result=array(
|
||||||
'x'=>$x,
|
'x'=>$x,
|
||||||
'y'=>$y,
|
'y'=>$y,
|
||||||
);
|
);
|
||||||
|
|
||||||
//print_r($result);die();
|
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -228,18 +228,18 @@ Slovenski narečni atlas / Slovenian dialectal atlas
|
||||||
|
|
||||||
if(transcription.id)
|
if(transcription.id)
|
||||||
{
|
{
|
||||||
g.append("text").attr('id','text-'+transcription.pin).attr("x","0px").attr("y","2px").attr("font-size","18pt").attr('class','SIMBola').style("fill", transcription.icon_color).text(transcription.pin);
|
g.append("text").attr('id','text-'+transcription.pin).attr("x","-5px").attr("y","0px").attr("font-size","18pt").attr('class','SIMBola').style("fill", transcription.icon_color).text(transcription.pin);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g.append("text").attr('id','text-'+transcription.pin).attr("x","0px").attr("y","2px").attr("font-size","18pt").text("/");
|
g.append("text").attr('id','text-'+transcription.pin).attr("x","-5px").attr("y","0px").attr("font-size","18pt").text("/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var element = d3.select('#text-'+transcription.pin).node();
|
var element = d3.select('#text-'+transcription.pin).node();
|
||||||
var width = element.getBoundingClientRect().width;
|
var width = element.getBoundingClientRect().width;
|
||||||
|
|
||||||
g.append("text").attr("x",width+8+"px").attr("y","0px").attr("font-size","12pt").text(transcription.short_name);
|
g.append("text").attr("x",width+3+"px").attr("y","-2px").attr("font-size","12pt").text(transcription.short_name);
|
||||||
|
|
||||||
// Create an SVG <use> element
|
// Create an SVG <use> element
|
||||||
var use = document.createElementNS(svgNS, "use");
|
var use = document.createElementNS(svgNS, "use");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user