#100

Product support

Visit this product's website for support.

Categories

  • Miscellaneous
  • Social

This plugin allows you to create and edit markers to then display them on Google map.

Aside coordinates, each marker can have a title, attached image and optional links to other content. At the moment, links to blog posts from RainLab.Blog and albums from Graker.PhotoAlbums are supported.

Marker's title, description, image and additional information can be displayed in pop-up window (when clicking on marker on the map) and as a post.

Usage

Don't forget to set Google API key on the plugin's Settings page.

To use the plugin, install it as usual, go to MapMarkers backend menu item, create some markers and optionally link them to blog posts and photo albums. Then add Map component to a page. The map will be displayed with all the markers you created. You can also add Map List component to list markers like posts.

See more on component settings in Documentation section.

Attaching posts and albums to markers is totally optional. If you have no need for it, you still can create markers with a title, image and description.

You can change markers display order by clicking on Reorder markers button on Markers backend page.

Single Url feature

If a marker has exactly one other model attached (either post or album), marker.singleUrl value will be available both in Map and Markers List component partials. It will contain a string with url to this single attachment. You can use it to link to this attachment from marker's thumbnail and title. An example usage is in component partials.

If there are more than one models attached (or none at all), marker.singleUrl value will be an empty string.

Thumbnail feature

Markers displayed in both Map and Markers List components can have image thumbnails. You can set up thumbnail width, height and resizing mode in component's parameters. Marker's thumbnail is automatically generated from any image available in following priority:

  1. If there is image directly attached to the marker, it will be used as a thumbnail.
  2. If there are posts attached to the marker, the first available featured image from any post will be used as a thumbnail.
  3. If there are albums attached, either front or latest photo from the first album will be used.
Creating marker

Map component

This component is used to render Google map with all markers. You can change settings for:

  • latitude and longitude for default map center
  • default map zoom
  • path to map marker icon (relative to site root)
  • X and Y offset to place marker icon correctly
  • image thumb generation width, height and mode
  • post and album pages (needed if you want to attach posts and albums to markers)

After setting up a component, look at partials at components/map in plugin directory. As you can see, beside default.htm (map container markup), there is popup.htm partial. It is used to render popups when markers on the map are being clicked. Override this partial's markup for your needs.

Markers List component

This component can be used to display markers as plain content (like posts), for example, under the map. You can change settings for:

  • image thumb generation width, height and mode
  • amount of markers on one page (for pagination)
  • post and album pages (needed if you want to attach posts and albums to markers)

For each marker you can display a title, image thumbnail, description and links to attached blog posts and photo albums. See partials at components/markerslist/ - default.htm is for the component markup and marker.htm is markup to display each marker.

1.1.3

Fix in thumbs generation

May 16, 2017

1.1.2

Occurences of posts and albums are made conditional too

May 16, 2017

1.1.1

Post and album relations are now optional in Marker forms

May 16, 2017

1.1.0

Make markers reorderable

May 14, 2017

1.0.1

Initialize plugin

May 14, 2017