Changing map and marker defaults
Posted: 30 Jan 2012, 21:21
I have put many hours in figuring out how to set the parameters for new maps and markers and wrote that down in my Phoca Maps configuraton file. But since I'm sure that I will not remember these settings when I'm working in the admin GUI, I thought of changing the source code according to my desired settings. And so I did!
The values for the variables are easy to find using phpmyadmin on the map and marker table. So if you want to use your own default, just check there.
When I'm adding new maps of markers, everything is now directly as I wanted it.
And I also edited the default location/zoomlevel for the maps to the center of NL, so that I do not have to scroll to our small country every time I create a map or a marker.
Please use this for your own benefit.
The result can be checked on my website: http://www.fischertechnikclub.nl/index. ... 57&lang=nl
The source code file you need to change for MAPS is this one:
I have used these settings:
The source code file you need to change for MARKERS is this one:
I have used these settings:
The values for the variables are easy to find using phpmyadmin on the map and marker table. So if you want to use your own default, just check there.
When I'm adding new maps of markers, everything is now directly as I wanted it.
And I also edited the default location/zoomlevel for the maps to the center of NL, so that I do not have to scroll to our small country every time I create a map or a marker.
Please use this for your own benefit.
The result can be checked on my website: http://www.fischertechnikclub.nl/index. ... 57&lang=nl
The source code file you need to change for MAPS is this one:
Code: Select all
administrator/components/com_phocamaps/models/phocamapsmap.php
Code: Select all
function _initData() {
if (empty($this->_data)) {
$table = new stdClass();
$table->id = null;
$table->title = null;
$table->alias = null;
$table->width = 600;
$table->height = 400;
$table->latitude = 52.024809808107115;
$table->longitude = 5.672607421875;
$table->zoom = 7;
$table->lang = '';
$table->border = 3;
$table->continuouszoom = 1;
$table->doubleclickzoom = 1;
$table->scrollwheelzoom = 1;
$table->zoomcontrol = 1;
$table->scalecontrol = 0;
$table->typeid = 2;
$table->typecontrol = 1;
$table->typecontrolposition = 3;
$table->collapsibleoverview = 1;
$table->dynamiclabel = 0;
$table->googlebar = 1;
$table->displayroute = 1;
$table->kmlfile = null;
$table->description = null;
$table->published = null;
$table->checked_out = null;
$table->checked_out_time = null;
$table->ordering = null;
$table->acces = null;
$table->hits = null;
$table->params = null;
$this->_data = $table;
return (boolean) $this->_data;
}
return true;
}
Code: Select all
administrator/components/com_phocamaps/models/phocamapsmarker.php
Code: Select all
function _initData() {
if (empty($this->_data)) {
$table = new stdClass();
$table->id = null;
$table->catid = null;
$table->title = null;
$table->alias = null;
$table->latitude = 52.024809808107115;
$table->longitude = 5.672607421875;
$table->gpslatitude = null;
$table->gpslongitude = null;
$table->displaygps = 1;
$table->icon = 6;
$table->description = null;
$table->contentwidth = '';
$table->contentheight = '';
$table->markerwindow = 0;
$table->published = null;
$table->checked_out = null;
$table->checked_out_time = null;
$table->ordering = null;
$table->acces = null;
$table->hits = null;
$table->params = null;
$this->_data = $table;
return (boolean) $this->_data;
}
return true;
}