madrigo64 / bliss_admin_panel

Web Admin Panel on PHP for Reality Dayz Private Server
12 stars 12 forks source link

Adding Celle #30

Closed MajorPainage closed 11 years ago

MajorPainage commented 11 years ago

I am trying to add Celle, and I edited the functions.php and added:

$map_array = array();
    switch ($map_name){
        case "mbg_celle2":
        $map_array['pixelOrigin_'] = '117.9, 96.4';
    $map_array['pixelsPerLonDegree_'] = '227 / 360';
    $map_array['pixelsPerLonRadian_'] = '227 / (2 * Math.PI)';
            $map_array['supported'] = true;                
            break;
        case "chernarus":
        $map_array['pixelOrigin_'] = '117.9, 96.4';
    $map_array['pixelsPerLonDegree_'] = '227 / 360';
    $map_array['pixelsPerLonRadian_'] = '227 / (2 * Math.PI)';
            $map_array['supported'] = true;                
            break;

But when trying to view map, it still says map not supported.

What am I missing.

madrigo64 commented 11 years ago

You can't add Celle map manually!

MajorPainage commented 11 years ago

Just did. Vehicles on the Y axis appear ok, Vehicles on the X axis appear to far right on the map.

Probably easier to widen the map to adjust to the vehicles.

I don't understand this part of your code and what it does.

$map_array['pixelOrigin_'] = '117.9, 96.4';
$map_array['pixelsPerLonDegree_'] = '227 / 360';
$map_array['pixelsPerLonRadian_'] = '227 / (2 * Math.PI)';
madrigo64 commented 11 years ago

map should be on this site too http://dayzdb.com/map, without this map it's impossible to display map

MajorPainage commented 11 years ago

I downloaded a map from google. Then adjusted the size to 3x256 wide by 4x256 high. Then I created my own 256x256 block images and saved them to mbg_celle2/2/ It shows fine as zoomed out, but still issue with alignment of vehicles. Going to try playing around with the map and widen it and see if it helps.

madrigo64 commented 11 years ago

so then you need to play with this complex code you need to change x and y $maparray['pixelOrigin'] = '117.9, 96.4'; and play with $maparray['pixelsPerLonDegree'] = '227 / 360'; try change 227 to other value it's not easy :) good luck

MajorPainage commented 11 years ago

Sounds good - Thanks for the pointer.

MajorPainage commented 11 years ago

I added Celle, and have it aligned pretty close.