479

Product support

Visit this product's website for support.

  • Added on May 16, 2017
  • Current version: 1.1.7
  • Platform Compatibility
    v3.x not tested
    v2.x not tested
    v1.x use latest
  • Created by
  • Public repository

Categories

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.

  • Found the plugin useful on 18 Mar, 2020

    Excellent plugin. Needed help from the author and he gave quick response and upgraded the plugin! Brilliant!

  • Found the plugin useful on 10 Dec, 2018

    Brilliant plugin ! thank you

  • author

    Replied on 10 Dec, 2018

    Thank you for the review!

  • Found the plugin useful on 11 Oct, 2017

    Great plugin! Is there a way to implement a search function if you have alot of markers?

  • author

    Replied on 11 Oct, 2017

    Thanks for the review!

    There's no markers search functionality at the moment. I'm not sure what kind of search could be implemented. I guess it couldn't be Site Search because markers don't have page components. Some autocomplete-like filter on MarkersList component might be in order but I didn't think of it before. Maybe you could describe what kind of search you have in mind in project's github issues? I'd take a look when I got time.

  • Found the plugin useful on 4 Jul, 2017

    Great plugin!!! I think you should pinpoint that an image should be set as Icon so they can appear as markers in the front-end.

  • author

    Replied on 4 Jul, 2017

    Thanks for the review! Where do you mean to pinpoint it? I think it is already called "Marker icon" in component settings. Do you mean another place? Feel free to contact me on Github or here from contact form in my profile if you like.

1.1.7

Fix issue with marker display without blog and album plugins on PHP 7.2+

Feb 10, 2020

1.1.6

RainLab.Translate support added, thanks to amdad

Oct 05, 2017

1.1.5

Fix for broken markers new/edit element in backend in chromium

Jul 16, 2017

1.1.4

Fix for default marker icon in the front-end

Jul 06, 2017

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