Customizing Markers with Images in Shortlist

854
1
Jump to solution
01-17-2018 07:41 PM
MarissaAltmann
New Contributor II

I'm looking for a way to add customized image markers/symbols/icons for the Beta Shortlist. I am already hosting on my own server and modifying the core files but I'm not exactly sure what to do.

Here are some examples, although they are from older Shortlist templates:

Zoo Babies | An Esri Story Map 

A gallery of Amazing Species 

As best as I can tell, I know I need to save the icons that I want to use within the resources folder. Where I'm stuck is figuring out how/where to link each image to the corresponding point via the StoryMap's code. I even looked at the Zoo Babies code on Github and it made me even more confused. GitHub - ssylvia/zoo-babies 

I'm pretty sure I need to add the link to the icons as the xlink here as in the below, from the zoo babies example

<image fill-opacity="0" stroke="none" stroke-opacity="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4" x="303.5" y="282" width="65" height="70" preserveAspectRatio="none" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="resources/images/mapMarkers/green/dark/lion.png" transform="matrix(1.00000000,0.00000000,0.00000000,1.00000000,7.00000000,-35.00000000)"></image>

<image fill-opacity="0" stroke="none" stroke-opacity="0" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4" x="187.5" y="229" width="65" height="70" preserveAspectRatio="none" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="resources/images/mapMarkers/green/light/anemones.png" transform="matrix(1.00000000,0.00000000,0.00000000,1.00000000,7.00000000,-35.00000000)"></image>

But I'm not really sure a) where to enter this and b) how I should know necessary that the marker is on the correct location. Do I just need to check visually? I'm just not sure how the above is linked to the point itself, or whether this method would even still work with the new Shortlist Beta.

Help?!

Thank you so much!

Marissa

0 Kudos
1 Solution

Accepted Solutions
MarkCooney
Occasional Contributor III

Hi Marissa,

In order to use your icons, you would need to set the path to your icon image here: storymap-shortlist/config.js at master · Esri/storymap-shortlist · GitHub .

Then you would need to change the logic of this function (storymap-shortlist/MainView.js at master · Esri/storymap-shortlist · GitHub ) to create your new icons (basically set the coloredIcon to  equal newContext.getImageData(0, 0, _myCanvas.width, _myCanvas.height and comment out this function storymap-shortlist/MainView.js at master · Esri/storymap-shortlist · GitHub ).

Mark

View solution in original post

0 Kudos
1 Reply
MarkCooney
Occasional Contributor III

Hi Marissa,

In order to use your icons, you would need to set the path to your icon image here: storymap-shortlist/config.js at master · Esri/storymap-shortlist · GitHub .

Then you would need to change the logic of this function (storymap-shortlist/MainView.js at master · Esri/storymap-shortlist · GitHub ) to create your new icons (basically set the coloredIcon to  equal newContext.getImageData(0, 0, _myCanvas.width, _myCanvas.height and comment out this function storymap-shortlist/MainView.js at master · Esri/storymap-shortlist · GitHub ).

Mark

0 Kudos