# Class Marker

This class represents a marker

  WPGMZA\Factory
  WPGMZA\Crud implements IteratorAggregate, JsonSerializable
  WPGMZA\Marker implements JsonSerializable

Namespace: WPGMZA
Located at class.marker.php

Methods summary
`public` | # `__construct( integer|array|object $id_or_fields = -1 )` Constructor Constructor #### Parameters $id_or_fields integer ID to read a marker, or an array or object to read data from to create a new one. If this argument is not specified, a new marker will be created. #### Overrides `WPGMZA\Crud::__construct()`
`public static` | # `getColumns( )`
`public static` | # `create_instance( $id_or_fields = -1 )` Deprecated. The Factory class will take over this functionality Deprecated. The Factory class will take over this functionality #### Deprecated
`public static` | # `get_table_name_static( )`
`public array` | # `jsonSerialize( )` Returns a clone of this marker for JSON serialization. Unsets latlng binary spatial data which corrupts JSON, and sets custom field data. Returns a clone of this marker for JSON serialization. Unsets latlng binary spatial data which corrupts JSON, and sets custom field data. #### Returns array A JSON representation of this marker, without spatial data and with custom field ata. #### Throws Exception #### Overrides `WPGMZA\Crud::jsonSerialize()` #### Implementation of `JsonSerializable::jsonSerialize()`
`protected string` | # `get_placeholder_by_type( string $type )` Overrides Crud::get_placeholder_by_type to correctly handle inserting and updating spatial data placeholders. Overrides Crud::get_placeholder_by_type to correctly handle inserting and updating spatial data placeholders. #### Parameters $type The column type #### Returns string If ths column type is point, the correct text-to-spatial function and placeholder. Otherwise, falls back to the default. #### Overrides `WPGMZA\Crud::get_placeholder_by_type()`
`protected string` | # `get_column_parameter( string $name )` Overrides Crud::get_column_parameter to correctly handle inserting and updating spatial data values. Overrides Crud::get_column_parameter to correctly handle inserting and updating spatial data values. #### Parameters $name The colum name #### Returns string If ths column name is latlng, the POINT function with this markers latitude and longitude. Otherwise, falls back to the default. #### Overrides `WPGMZA\Crud::get_column_parameter()`
`protected string` | # `get_arbitrary_data_column_name( )` Returns "other_data", which is the name of the column used to store arbitrary data on thet marker table. Returns "other_data", which is the name of the column used to store arbitrary data on thet marker table. #### Returns string Always other_data for the marker table. #### Overrides `WPGMZA\Crud::get_arbitrary_data_column_name()`
`public` | # `update( )` Updates the map object in the database Updates the map object in the database #### Returns $this #### Throws Exception The object has been trashed #### Overrides `WPGMZA\Crud::update()`
`protected` | # `update_latlng( )` Called to update the latlng column for this marker in the database, when any changes are made to this objects properties lat, lng or latlng. Called to update the latlng column for this marker in the database, when any changes are made to this objects properties lat, lng or latlng.
`public` | # `__set( string $name, mixed $value )` Sets the named property, calling update_latlng where needed. Sets the named property, calling update_latlng where needed. #### Parameters $name The property name $value The value to set on the specified property #### Throws Exception The object has been trashed Exception The specified property is read-only #### Overrides `WPGMZA\Crud::__set()`
`public` | # `getPosition( )`

Methods inherited from WPGMZA\Crud
`__get(), __isset(), __unset(), assert_not_trashed(), bulk_read(), bulk_trash(), column_exists(), create(), getIterator(), get_column_names(), get_column_parameters(), get_column_placeholders(), get_column_type(), get_columns(), get_table_name(), is_read_only(), parse_arbitrary_data(), read(), set(), store_arbitrary_data(), trash()`

Methods inherited from WPGMZA\Factory
`createInstance()`

Constants summary
`string` | `DEFAULT_ICON` | # `"//maps.gstatic.com/mapfiles/api-3/images/spotlight-poi2.png"`

Constants inherited from WPGMZA\Crud
`BULK_READ, SINGLE_READ`

Properties summary
`protected` | $custom_fields | # ``