Close

Sitecore Module – Point of Interest

Usually, there are clients that need a module that let them add pins to maps or highlight a specific section on an image.

This feature will help content authors to add a point of interest to an image. Only need to select the background image and start adding multiple dots, it will automatically set the exact position where they picked.

Once you’ve installed the package you will see two new templates:

2017-11-08 12_18_57-Desktop

The one you should take care is the Point Of Interest Map. You can create an instance of it by right-click on the new folder you will find under /sitecore/content/Global/Modules/Point of Interest Module, you can relocate it depends on your needs. At first sight, you will notice one new tab at the right (next to “Content”), called “Map”. If your image is not loaded yet, you will see the alt message:

2017-10-30 17_30_20-Desktop

This item will have one field called “Background Image” that will contain the image you want to mark.

2017-10-30 17_36_11-Desktop

Once you’ve set an image, you will see it displayed in the Map editor so you can start adding point items. It’s really straightforward, just click on the position you want to highlight and a dialog will pop-up:

2017-11-06 15_09_09-Desktop

Fill a title if you deserve and then submit. You will see a confirmation dialog:

2017-10-30 17_56_24-Desktop

Now, you will see a new point of interest in your image:

2017-11-06 15_13_08-Desktop

If you click on the new item, you will be redirected to the point of interest item in the content tree. You will notice there are only a few managed fields:

2017-11-06 15_19_32-Desktop

On the Style section, you can see the Icon Class field, where you can decide the style for your pin. This module is working with font-awesome fonts but you can create your owns and set the style in here.

2017-11-06 18_00_31-Desktop

It also supports drag and drop functionality using interact.js javascript library. So you can move your dots to the desired position and it will be updated automatically.

module

You can also change the background image an modify your POI items as needed

2017-11-06 18_24_04-Desktop

This module has two extra configurations that you can activate/deactivate on the SharedSource.Poi.config file:

  1. SharedSource.Poi.UseTitle
    • Uses the name as also title
  2. SharedSource.Poi.ShowTitleFallback
    • Shows Name instead of title when it’s empty

 

As an extra, the package includes a Controller Rendering and a view that you can use as you need. If you want to change the way it renders, you can always get the source code 🙂2017-10-30 19_05_51-Desktop

You can add to your presentation details and it should look like this:

2017-11-08 14_24_51-Welcome to Sitecore.png

Let me know if you need further information about this module and how you can extend it.

Resources:

 

Happy Sitecoring 😉

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Back to top
%d bloggers like this: