Display Google Maps via KirbyTag

Here is a simple Plugin to include Google Maps in your content via Kirbytag. -> GitHub

Simple Example:

(googlemaps lat: 35.7152128 lng: 139.7981552 zoom: 4)

KML:

(googlemaps lat: 35.7152128 lng: 139.7981552 zoom: 4 kml: route.kml)

When you have ideas for feature, write it in a comment here or better create a issue on Github.

TODO:

  • Add lat, lng, zoom via field values.
4 Likes

Thank you for your work, @fanningert!

You asked for suggestions, so here are a couple:

  • provide a way for people to enter an address instead of lat/lng:
(googlemaps addr: 123 Some Street, Someplace AZQ 9999 - SomeCountry zoom: 4)

Please, keep up the good work - it’s appreciated!

@luxlogica Really good ideas. The map style should be a easy feature. Also the address attribute should not be a problem. I hope I get it ready in my next release (This weekend). Because after that I will be for 5 weeks on vacation.

Other features in the next release are.

  • Multi KLM
  • Multi Marker

Regards
Thomas

1 Like

I create two issues on GitHub.


@luxlogica
Hi, one off your feature request is implemented. Now you can use the attribute place as location option.

Warning: In this new version some changes are made by me (deleted and renamed some attributes). Look at the ChangeLog in the Git repository.

1.1

  • Multi KMLs (Google Maps API supported 5 Layers. When you need more KML files, use the Network Link feature of the KML files)
  • Multi marker (AutoFit exist)
  • Alternative location definition per Google Place API (Example.: location per address)
  • Many configuration options (kirby.extension.gmaps.controls.streetview, kirby.extension.gmaps.controls.maptypes, kirby.extension.gmaps.controls.maptype.default, kirby.extension.gmaps.controls.maptype_selectable, kirby.extension.gmaps.controls.fitbounds.marker, kirby.extension.gmaps.controls.fitbounds.kml)
  • Removed following config-value kirby.extension.gmaps.marker
  • Renamed following config-value kirby.extension.gmaps.ui.draggable to kirby.extension.gmaps.controls.draggable
  • Renamed following config-value kirby.extension.gmaps.ui.zoom to kirby.extension.gmaps.controls.zoomable
  • Renamed following attribute ui_draggable to draggable
  • Renamed following attribute ui_zoom to zoomable
  • Removed following attributes kml and marker, use the kml and marker elements

Known Bugs:

  • AutoFIT (FitBounds) don’t work with KML layers (This is a problem of Google Maps API)

1.2

  • Add config-value kirby.extension.gmaps.controls.scale for scaleControl
  • Add attribute scale for scaleControl

1.3

  • Marker support now the place attribute
  • Marker support now HTML content as element body. This content will be displayed as content of the popup when a user click on the marker.

1.4

  • Add licence file

1.5

  • Page field support for JS_ATTR_ZOOM, JS_ATTR_LNG, JS_ATTR_LAT, JS_ATTR_PLACE, JS_ATTR_KML_TITLE and JS_ATTR_MARKER_TITLE
    Example: (googlemaps lat: {page-lat} lng: {page-lng} zoom: {page-zoom})

Great work, @fanningert! Thank you!