@Jo_Pitts1 @SanfordWhiteman Follow-up question - My contacts have lat/lon, and I'm trying to update the map to include the lat/lon based on a token. I know the values paste appropriately, but I'm not sure if it's a load time issue or not, as I get a maps error.
My token is setup as follows:
https://maps.googleapis.com/maps/api/staticmap?center=${OpportunityList.get(0).Latitude},${OpportunityList.get(0).Longitude}&zoom=12&size=400x400&maptype=roadmap&key=KEY
And then I load the image as:
<img src="{{my.Gmaps}}" img="" alt="Alt Text" width="400" height="400" />
I would output the entire img tag from velocity (not just the src). Just outputting the attribute value isn’t supported (though it sometimes works depending on the tag).
But what do you mean by “paste appropriately“? What’s the resulting URL? Should be easy to see in your source.
My bad, I know that they provide the proper lat/lon as the formatting is required.
The result of the image is blank, this is the response from the link:
{"message":"Page Not Found"}
This is the URL, how can I see what is sent off with the tokens formatted?
<img src="https://maps.googleapis.com/maps/api/staticmap?center=${OpportunityList.get(0).Latitude},${OpportunityList.get(0).Longitude}&zoom=12&size=400x400&maptype=roadmap&key=AIzaSyDeFh1fQADsDUAqoCty9jz-v5c6dTVlrmk" img="" alt="Alt Text" width="400" height="400" />
Look in the source of a received email? Or use Preview-by-List and inspect the image. Of course you can also output the URL on its own in the email to see it as pure text.
So in looking at the source, it appears it's sending the named tokens, not the values. Is this because I'm not escaping the $?
<img src=3D"https://maps.googleapis.com/maps/api/staticmap?center=3D${OpportunityList.get(0).Latitude},${OpportunityList.get(0).Longitude}&zoom=3D12&size=3D400x400&maptype=3Droadmap&key=KEY" img=3D"" alt=3D"Alt Text" width=3D"400" height=3D"400"/>
I don’t see an encoding issue here. Why would you escape the dollar sign (since you’re trying to use its special meaning, the start of a Velocity reference)?
More like the person doesn’t have any Opportunities. Thus the values are null, and Velocity outputs the raw source code in this case.
That's what's weird though, that person does have those values