Home / eZ / HowTo / eZ Publish 4.2 - How I use Google Maps

eZ Publish 4.2 - How I use Google Maps

google maps mashup

From the new Google Map layouts in eZ Flow and Geo Article in base eZ Publish version 4.2, to simply linking maps.google.com. Try to run it down as simply and concisely as possible.

The inspiration is that with the latest release, while still supporting older releases, there almost too many ways to interface with Google Maps.

It has gotten well into the middle E in the concept of EEE (Embrace, Extend, Extinguish). Get a handle on it here to try to retain what little sanity may remain and fight off the last E.

First, the latest, greatest, and pretty darn easy.

Requires eZ Publish 4.2 or later.

Check the Setup->Extensions to be sure the ezgmaplocation is present and checked as enabled. If not enabled, checkmark it and click the "Regenerate .. " button.

Each site requires a unique Google Maps API key. Get one for your site here..

Also requires addition to /settings/override/site.ini.append

To the [SiteSettings] block..

GMapsKey=ABQI....Paste the Key Here......kA

Then a cache flush and it should be good to go.

Google Maps layout block.

Just like adding any other kind of block, and inserts a live, UNEDITABLE IN PLACE, google map right into the page layout.

a. Add the block

ez_maps-420-ezFlow-fresh-install

b. Fill in the details

ez_maps-420-ezFlow-insert-apikey

c. Publish

ez_maps-420-ezFlow-map-displays

Second, About as Simple, and Quite a Bit More Powerful

Requires eZ Publish 4.2.

Geo Article content type

Essentially an article, with a google map built in. With embedded features like this, eZ Publish is another step down the path of morphing into an easy to use mashup creator. Similar to the once freely available IBM QEDWiki.

A. Select the Geo Article type for new content creation.

ez-4.2-google-maps-mashup

B. The map and lat-lon are returned in place using ajax.

ez-4.2-google-maps-asy-response

C. Publish.

ez-4.2-google-maps-published

A more powerful map view with zoom and pan tools greets visitors to a geo article page.

Do not waste time setting zoom and pan and etc in the ajax interface, the published interface will revert to the default view. As demonstrated by these two views.

D Carefully set up prior to publishing, zoomed out to show Preston, UK

ez-4.2-google-maps-asy-response-custom

E. Custom settings are lost at publication time.

ez-4.2-google-maps-asy-response-customizations-lost

Favorite Map Method for Older Versions, Still Works in eZ Publish 4.2

A simple hack of eZ Publish tagging architecture that is flexible and powerful.

Requires a Google maps api key

Only claimed to work on 4.x and up, but the concept should work with earlier versions.

http://ez.no/developer/contribs/datatypes/include_googlemaps

Only one small file, and a couple of settings changes are required.

A. Put the template file "include_googlemaps.tpl" into existing file structure and edit or create the two settings files.

include-googlemaps-files

B. May need to clear caches once, then a new "custom tag" appears in the drop down listing when the "Custom Tag" icon is clicked in the editor toolbar.

include_googlemaps-an-option

C. Fill in the details to suit.

include_googlemaps-fill-in-details

D. After clicking OK, only a custom tag appears in the editor window for the troubles. But when published, the designed map appears to website visitors. This option offers more initial configuration options, and more web visitor controls than any of the "factory" options listed above.

hello-from-preston-mo

The Most Flexible, Reliable, Version Independent Method

Requires at most a google maps account.

A simple link out to maps already created on maps.google.com can be the most flexible and powerful option of them all. By just clicking a link, your visitors gain access to a map, or even entire arrays of custom maps that you or others have built. Pictured below are a series of lake maps of Missouri hosted directly on Google.

A. Lake Pomme de Terre

google-maps-pomme

B. Truman Lake

google-maps-truman

Today, everybody wants a map on their site. It is nice to be able to explain in some detail the options and tradeoffs, so they may get exactly the look they want on the first pass.

Animated GIF eZ Logo

No need to dream up layouts and page views, just insert your "stuff".

Roll Your Own Social Network

News networks, and personal sized social networking sites are simple with eZ.