Geolocation map not appearing on item page


This topic was recently closed on the forum (, but I am having the same problem--no map appears on the item page.

I have set the height and width both to 200px.

I am using Santa-Fe as a theme and am on v.1.3 of Omeka using v.1.2 of the Geolocation plugin.

I have made some changes to the theme. Can you point me to specific files where such changes may be incompatible with the plugin?


Any changes that would affect this would have been made to the items/show file. Did you maybe delete the plugin hook?

Hi Ken,

The map shows up when editing the item in the admin mode.

Not sure what the "hook" is. Can you explain?

If you would like to see a copy of my file, please let me know.


Update: I had changed the dimensions of my map by adding the following to the show.php file:

<?php echo geolocation_google_map_for_item($item,$width='250',$height='250'); ?>

According to a previous post, I need units of measure here. I changed this to 250px and now have space on the item page for a map, but still no map.

Do you have any other suggestions?



<?php echo geolocation_public_show_item_map('250px', '250px'); ?>

Hi Ken,

I tried that line of code, but the map still does not appear. Where is this function defined?


It's in plugin.php.

Do you have a developer tool installed for your browser (e.g. Firebug for Firefox)? I'm wondering if maybe there is a javascript error, because that line works fine on my installation.

Additionally, did you take out the original line calling the map? That could cause problems. The one I posted should be the only line calling geolocation on the page.


Yes, I did take out the original line. I also tried leaving out both lines and just using the default settings for the plugin. Still, no map. As I mentioned previously, though, the original line of code does create a space on the item page for the map.

Here is a sample item that should have a map displaying:

I do have a Web Developer add-on for FF, but am not sure how to detect a javascript error. I use this mainly to make CSS changes.

Are you sure you copied the following exactly?

<?php echo geolocation_public_show_item_map('250px', '250px'); ?>

The javascripts for the maps are not loading, but they should if you are using the above function. Can you confirm this?


Yes, I have copied that line exactly have removed the previous function. For the Geolocation configuration, I have selected to "Add Link to Map on Items/Browse Navigation."

For what it is worth, I also selected to "Add the map to the contribution form" and that works.


It seems like you might be working on it, as i no longer see anything being loaded related to the map.

Quick question, are you using <?php echo plugin_append_to_items_show(); ?> to call Social Bookmarking, or are you calling that one individually as well?


I think the reason nothing is loading is that I have removed this line:
<?php echo geolocation_google_map_for_item($item,$width='100px',$height='100px'); ?>

I didn't make any other changes.

I am using the following to display the Social Bookmarking feature:
<?php echo plugin_append_to_items_show(); ?>


Ok can you try this?

Remove <?php echo plugin_append_to_items_show(); ?>

and add

<?php echo geolocation_public_show_item_map('250px', '250px'); ?>


I apologize for not writing back sooner. I have been working on other things for the past several days. Just looked at this and tried what you suggested. Removing the social bookmarking plugin did not help, unfortunately. Still no map on the item page.


Just to try to rule out or narrow in on your theme as the issue, can you try temporarily switching to one of the "stock", unmodified themes that Omeka ships with?


I just tried switching my theme to Rhythm, but still see no map on the item page.


Ok. It's still not really clear what's going on here.

Have you altered the settings for "Width for Item Map" and "Height for Item Map" in Geolocation? Leaving those options blank will cause the plugin to pick its default size.

Without any additional code, the Geolocation map should show up on your items/show page where you call plugin_append_to_items_show(). The only way it should not append any code to the page (as appears to be happening) is if you've modified your Geolocation plugin files (or, obviously, deactivated the plugin entirely).

Oddly, this very same issue is happening to me after removing <?php echo plugin_append_to_items_show(); ?>, and trying to display the map on my Item Show view using <?php echo geolocation_google_map_for_item(); ?> with or without the map size values.

It also doesn't matter if I follow your suggestion on that closed thread, and add px to my dimensions in the admin configuration panel.

The ONLY way the map displays on Show Item view is by using the 'plugin_append_to_items_show' function, which I do NOT want to do since it doesn't allow me to control the order in which my plugins appear on the page.

I am running Omeka 1.4.2, using the Emiglio theme, and am using the current plugin.


I have the same problem as mentioned above: the geolocation map isn't appearing on the item pages. It only appears when I de-activate the MyOmeka plugin! (which isn't working well too at this moment)
Is it possible that the (lay-out of) MyOmeka is interfering with the geolocation item map?
Or is there something else I am missing, being a newbie?
I have Omeka 1.5.1, using the Emiglio theme and the current plugin.


I'm still running into this issue on Omeka v.2.0.2 -- now with the Seasons theme (most recent upgrade from last week), since Emiglio isn't compatible with v.2x.

My first guess is that, as above, there is another plugin that Geolocation is colliding with. Can you try temporarily deactivating other plugins to see if one of them is conflicting?

Just to clarify, is nothing from geolocation at all appearing, or is a "Geolocation" label appearing, but no map, or just not the pins on the map?

Nothing from geolocation shows up at all, including the "Geolocation" heading, AND everything listed after that (the entire Secondary content area/sidebar) disappears.(See: screenshot)

This is how I used to display just the Geolocation plugin (instead of every appending plugin) on Show Item of Omeka 1x<?php echo geolocation_public_show_item_map(); ?>, AFTER removing <?php echo plugin_append_to_items_show(); ?>. This used to work fine on 1x (example site here).

On Omeka 2x, it looks like we now need to remove <?php fire_plugin_hook('public_items_show', array('view' => $this, 'item' => $item)); ?> to prevent all appended plugins from display on Show Item. I tried this with <?php echo geolocation_google_map_for_item(); ?>, and then separately with <?php echo geolocation_public_show_item_map(); ?>. But all that happens is the scenario I mention Geolocation box shows up, and all content/code following does not display.


Ah, I think that explains it!

Those geolocation functions that were echoing content are no longer part of the plugin in the 2.x version.

I think there are two different courses of action, depending on how to handle the public_items_show hook.

One way is to leave the

<?php fire_plugin_hook('public_items_show', array('view' => $this, 'item' => $item)); ?>

in place, and modify the plugins that you don't want to show their content on the public item page. You could do this by going into each of those plugins and looking for the array of hooks it fires near the top. It'll look something like:

protected $_hooks = array(

Just remove or comment out the 'public_items_show' from the array in each of the plugins you do not want to add stuff to the page.

The other approach is to keep the fire_plugin_hook deleted, and recreate what geolocation does to show the map. The function hookPublicItemsShow() in GeolocationPlugin.php does the work of displaying the map.

To recreate that in a function that you write, you could use $view = get_view() and $item = get_current_record('item') to get the variables you need.