A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: gmap/mod.gmap.php

Line Number: 453

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 453

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 453

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 453

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: gmap/mod.gmap.php

Line Number: 454

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 454

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 454

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 454

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: gmap/mod.gmap.php

Line Number: 512

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 512

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 512

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 512

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: gmap/mod.gmap.php

Line Number: 513

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 513

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 513

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 513

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: gmap/mod.gmap.php

Line Number: 453

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 453

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 453

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 453

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: gmap/mod.gmap.php

Line Number: 454

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 454

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 454

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 454

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: gmap/mod.gmap.php

Line Number: 512

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 512

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 512

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 512

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: gmap/mod.gmap.php

Line Number: 513

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 513

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 513

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 513

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: gmap/mod.gmap.php

Line Number: 453

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 453

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 453

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 453

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: gmap/mod.gmap.php

Line Number: 454

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 454

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 454

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 454

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: gmap/mod.gmap.php

Line Number: 512

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 512

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 512

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 512

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: gmap/mod.gmap.php

Line Number: 513

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 513

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 513

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: gmap/mod.gmap.php

Line Number: 513

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /storage/av01427/www/objective_html/system/codeigniter/system/core/Exceptions.php:170)

Filename: core/Common.php

Line Number: 479

Objective HTML - Google Maps for ExpressionEngine - Examples Jump to Content

Objective HTML

Google Maps for ExpressionEngine

The complete geolocation and mapping toolkit

Initializing Your Map

Initializing the map really only requires 1 tag, the id, but a style or class parameter must be used to define the map's height and width. Without setting a height and width – either inline or in your stylesheet – your map will not appear.

Notice, this map is totally blue. It's because the map is centered to the coordinate (0,0) since no other parameters are set. (The blue is the ocean.)


{exp:gmap:init id="map1" class="gmap" style="width:100%;height:400px" scrollwheel="false"}		

Plotting a Single Marker

Some people just want plot a single marker on one location. This is really easy and doesn't even require the use of the Fieldtype or a database.


{exp:gmap:init id="map2" address="Spain" zoom="5" class="gmap" style="width:100%;height:400px" scrollwheel="false"}

{exp:gmap:marker id="map2" address="Spain" zoom="5"}

Add a Marker and Information Window

The inner tag data is used to create the content for the information windows. If you only have one location on the map, it's a good idea to automatically display to the information window.

This method is really useful for quickly creating maps on contact pages of the clients location. For most smaller sites and companies they will only have one location and this is the quickest way to do it in ExpressionEngine.

	
{exp:gmap:init id="map3" script_tag="false" class="gmap" style="width:100%;height:400px"}

{exp:gmap:marker id="map3" address="Spain" zoom="5" open_windows="true"}
	

Spain

Spain Flag

{/exp:gmap:marker}