Select to view content in your preferred language

CustomContent with Popup

475
2
Jump to solution
07-11-2023 11:34 AM
BhavinSanghani
Occasional Contributor II

I am trying to display custom content in this sample https://codepen.io/b2810s/pen/WNYrveg but it doesn't display or call the creator().

It looks like a bug with the API. Is there any alternative to display custom content on popup without adding graphic or feature layer? 

I want to display popup with the routes near to the clickpoint. Routes will need be displayed with they hyperlink so, user can click on it and open the route details.

 

0 Kudos
1 Solution

Accepted Solutions
JohnGrayson
Esri Regular Contributor

The 'content' property of the 'openPopup()' method doesn't list CustomContent as valid parameter type.  For your use case you can just use a function that returns the HTMLElement directly:

https://codepen.io/john-grayson/pen/BaGJMvw

View solution in original post

2 Replies
JohnGrayson
Esri Regular Contributor

The 'content' property of the 'openPopup()' method doesn't list CustomContent as valid parameter type.  For your use case you can just use a function that returns the HTMLElement directly:

https://codepen.io/john-grayson/pen/BaGJMvw

BhavinSanghani
Occasional Contributor II

Thanks @JohnGrayson , that worked for me!

0 Kudos