Google maps in geolocalization plugin

Hello. I want to use Google Map in my Omeka. Should the Google Map Api be inserted into the Geolocalization plugin? or what configurations should be done?

Thanks for your answers.
Liss Campos

The Geolocation plugin uses Leaflet. There is no way to use Google Maps without rewriting a major portion of the plugin.

As an alternative to modifying the plugin or creating a new one, you could always just customize your theme’s items/show template (and any others where the map is displayed). In other words, use the Geolocation plugin (as is) to enter and store the data, but customize the display that users see.

First, you’d need to remove the public_items_show hook (etc) to prevent the default map from appearing in items/show.php. If you have other plugins that require this hook, you’ll need to add them back manually one at a time (which is a different topic altogether).

You could use something like this to get the latitude and longitude of your single $item.

if($location = get_db()->getTable( 'Location' )->findLocationByItem( $item, true )){
    $latitude = $location[ 'latitude' ];
    $longitude = $location[ 'longitude' ];
}

Then you would need to build your own map using the Google Maps API.

Obviously, this would require some developer time (maybe not a beginner task), but it would be much quicker and more sustainable than building a new plugin or modify the existing one.