Get in touch:
01524 851 877
07718 896 553

Openlayers + Bootstrap tiles missing

Posted on Apr 19 2014

I’ve just implemented a mapping system that uses openlayers for the mapping engine. I am also using twitter bootstrap to help with the CSS for the site.

Unfortunately these two together result in only half of the tiles being displayed in the map. This is down to bootstrap setting a global property for the img tag as follows:

img { max-width:100%; }

This can be overcome by overriding this setting for your map as follows (presuming your map has an id of #map)

.map img { max-width:none; }

Thanks to this blog post for pointing me in the right direction.

Bear Development Ltd

Posted on Apr 18 2014

Evolution Systems Development and Consultancy provided some highly technical work above and beyond our expectations. The quality of the work provided was simply outstanding. They have an impressive responsiveness, follow up and professionalism.

These are attributes that you can’t often find to such high standards anywhere else. Evolution Systems Development and Consultancy¬†definitely inspires trust and confidence in their clients and we are looking forward to working with their talented Android team again.

Andrew Greaves, Managing Director Bear Development Ltd

Codeigniter REST server with Tank auth

Posted on Apr 18 2014

I’ve just had the need within codeigniter to integrate basic auth in Phil Sturgeons REST server¬†with the tank auth authentication library. As it turns out it is quite a trivial task.

In application/libraries/REST_Controller.php find the following function:

protected function _check_login($username = '', $password = NULL)</pre>
 {
 if (empty($username))
 {
 return FALSE;
 }

 $auth_source = strtolower($this->config->item('auth_source'));

if ($auth_source == 'ldap')
 {
 log_message('debug', 'performing LDAP authentication for $username');
 return $this->_perform_ldap_auth($username, $password);
 }

$valid_logins = & $this->config->item('rest_valid_logins');

if ( ! array_key_exists($username, $valid_logins))
 {
 return FALSE;
 }

// If actually NULL (not empty string) then do not check it
 if ($password !== NULL AND $valid_logins[$username] != $password)
 {
 return FALSE;
 }
 return TRUE;
 }

And replace it with the following:

protected function _check_login($username = '', $password = NULL)</pre>
{
 if (empty($username))
 {
 return FALSE;
 }
 return $this->tank_auth->login($username, $password, FALSE, FALSE, TRUE);
 }

If you are not auto loading the tank auth library, be sure to do that in your constructor as well.