Home
google maps API marker images
- Details
Here is a list of all the markers: https://sites.google.com/site/gmapsdevelopment/
here is how to added them to a marker
instantiate the object:
var marker = new google.maps.Marker({position: new google.maps.LatLng(lata,longi), map: map,title: "Some title", icon: 'https://maps.google.com/mapfiles/ms/micons/rangerstation.png'});
Flow and Method:
var allMarkers = [];
var marker = new google.maps.Marker({position: new google.maps.LatLng(lata,longi), map: map,title: "Some title"});
allMarkers.push(marker);
var marker = new google.maps.Marker({position: new google.maps.LatLng(lata2 ,longi2 ), map: map,title: "Some title 2"});
allMarkers.push(marker);
for(var ix=0;ix< allMarkers.length;ix++ )
{
allMarkers[ix].setIcon('https://maps.google.com/mapfiles/ms/icons/red-dot.png');
}
Install GMP on Ubuntu 14
- Details
Installing GMP should be easy:
if you need it for a PHP application then you can just do this:
apt-get install php5-gmp
nano /etc/php5/apache2/php.ini
#add the following line to the ini file
Added extension=php_gmp.so to php.ini
#save and restart apache
service apache2 restart
If you need the latest build for any other reason do this:
the first thing I do is:
cd /
mkdir downloads
cd downloads
Get the tar from here https://gmplib.org/
at the time of this article I used:
wget https://gmplib.org/download/gmp/gmp-6.0.0a.tar.lz
You will need lzip installed and dev tools
apt-get install build-essential gawk m4 gcc-multilib
apt-get install lziptar --lzip -xvf
gmp-6.0.0a.tar.lz
cd gmp-6.0.0.0
mkdir build && cd build
../configure --prefix=/usr/gcc_4_9 --build=x86_64-linux-gnu
make
make check
make install
$arrayParams 'errormessage'
- Details
Passing 'errormessage=>'some message' will replace the default error message when there is a validation error.
addValidation valueNotInDBTable
- Details
before you can use any type of table validation you will need to give that element a db link.
sample:
$this->siteForms->boundElements['username']->db = $this->db;
$this->siteForms->boundElements['username']->addValidation('valueNotInDBTable',array('table'=>'users','col'=>'username'));
If you wanted to allow the user to change their username in a form you would want to specify the original value to be allowed in case they don't change their username.
$this->siteForms->boundElements['username']->addValidation('valueNotInDBTable',array('table'=>'users','col'=>'username','ignoreorignalvalue'=> $this->web_helper->getFormValue("oldusername","","Username")) );
The olderuser element would look like this:
$this->siteForms->createElement('oldusername',false,'oldusername',"", "UserName");
$this->siteForms->boundElements['oldusername']->form_web_type = "hidden";
$this->siteForms->boundElements['oldusername']->col_name='username';
$this->siteForms->boundElements['oldusername']->auto_populate_db = true;
Page 5 of 40