Hello, I am exploring a rebuild of one of our public facing apps using one of the newer Instant App templates, to meet a requirement for Google Analytics reporting. I've tried finding an existing post for this issue but no luck.
An important piece in rebuilding the app is displaying multiple images per feature within the pop-up, using dynamic URLs that use a {field_name} or ID to populate the URL.
It appears I am unable to do this using the New Map Viewer/JS 4.x apps, and instead receive a broken image.
Example URL: "https://sample.s3.amazonaws.com/Base_{field_name}.jpg"
When I click on the image to go to it directly in the browser, I can see the {field_name} is not populating in the URL.
An image using a static URL such as "https://www.sandiego.gov/sites/default/files/cosd-logo-initials-full-color-300ppi.jpg" works as expected:
I do believe this is intended to be a supported feature, as it is mentioned in the documentation and the option is there to include an select a field name:
What am I missing... or is this a bug?
Thank you!
Solved! Go to Solution.
You will need to go to configure fields in Map Viewer and set decimal places to 0 and remove the decimal separator. These are set on the field and are being honored anywhere the field is set for use.
Then it will work
You will need to go to configure fields in Map Viewer and set decimal places to 0 and remove the decimal separator. These are set on the field and are being honored anywhere the field is set for use.
Then it will work
Thank you @RussRoberts that worked and is not something I would have ever thought of... appreciate the quick reply.
Great to know there is a work around. I don't recall having to do this in the classic map viewer.
Its the 4.x JSAPI honoring the field formatting set on the field for the popup and the popup media is coming from the popup. The url generated for this numeric field was adding the , and .00 to the URL which would cause a 404 to the image link.
I'm having a similar issue to this, but when I check the field formatting I do not have the ability to remove significant digits. Is there another work around to get this to work?