Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to add image in the desription? #30

Open
adamsss92 opened this issue Feb 19, 2019 · 1 comment
Open

Is it possible to add image in the desription? #30

adamsss92 opened this issue Feb 19, 2019 · 1 comment

Comments

@adamsss92
Copy link

Hello,

I'm working on spyglass type map. I would like to add image in the description like i can do this in case of map series. Is it possible? I can't see any advanced options such as adding html code or something like this.

Best regards,
Adam

@aravindesri
Copy link

aravindesri commented Feb 20, 2019

Hi Adam,

It is possible to add an image to the Swipe Spyglass type map. We don't support adding images with tags directly into our builder currently. Therefore, the workaround is to use ArcGIS Online Assistant to modify the app's JSON to incorporate the HTML tags to bring in an image.

Step 1: Copy the Swipe template's ID and go to https://ago-assistant.esri.com/.
Step 2: Login with the correct ArcGIS Online's organization account.
Step 3: Using the search bar, paste the item's ID into it and then in the dropdown for "I want to", choose
"Edit an item's JSON".
Step 4: Click on the Swipe template block and you'll see 2 JSON files on your right - Item details & Data.
Step 5: Scroll down to Data and hit the "Edit" button to confirm the risks of editing the application's JSON.
Step 6: In the data.json, you should find "sidePanelDescription": "true". Change this to the following for a quick test:
"sidePanelDescription": "Giraffe! <div id='description' class='description'><img src='https://d2gg9evh47fn9z.cloudfront.net/800px_COLOURBOX2777234.jpg'></img></div>"
Step 7: Save the JSON by clicking the "Save" button.

Reload the viewer of the Swipe template and confirm that the image of Giraffe appears in the description pane. You can now add the style attributes to the tag to make it fit better in the description container. You will have to host these images and provide the URL for this to work.

If you have the Map Series turned on in Swipe, you will have to paste the above HTML into the "bookmarks" object which contains the property "description" within it.

Let us know if that helped, Adam.

Thanks,
Aravind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants