Today I am going to explain how to insert links in an image with respect to the position of the image. Say for an example: In FB, we will have a tag on photos. In any location or a specific part of the image, we do tag a person. Similarly, we can refer a link to the image when they click on a specific part of the image.
To implement this first,
1. Create a site page in the SharePoint 2013 site.
2. Insert an image in the page.
Then we have to write code to display links on the page.
3. Open the page in designer and give a propety usemap=”#country” in the image tag.
<img alt="globe.png" src="/teams/CreditPoint32/1.5.2Site/SiteAssets/SitePages/Test2Page/globe.png" usemap="#country" style="margin:5px;" />
Now add rectangle, circle and polygon shape of links to cove a part in the image.
In the above image we have countries. To insert links to specific country when we click on the “ASIA” or any other country in the image
Add rectangular type of mapping in the page (Below <img> tag
<area shape="rect" value="multireg" coords="69,20,270,79″ href="http://www.google.com"> <area shape=" rect " value=" america " coords="12,265,80,80″ href="http://www.google.com"> <area shape=" rect " value=" asia " coords="332,260,255,80″ href="http://www.google.com"> <area shape="rect" value="europe" coords="69,320,270,268″ href="http://www.google.com">
You may like following SharePoint tutorials:
- Create or Update list using rest api in SharePoint
- Delete list item after specific duration using SharePoint designer workflow
- You may be trying to access this site from a secured browser on the server
- PowerShell SharePoint tutorial with examples
- Hide Save button in New and Edit form in SharePoint 2013 list
- Show/Hide List form fields based on condition using SPUtility in SharePoint 2013
- Add Like and Ratings to Discussion Board in SharePoint
- Create and use image mapping in SharePoint Online
This we can find hot spots and give links to navigate the location. Hope this will help you in your development
The turning point in the process of growing up is when you discover the core of strength within you that survives all hurt.