Add image to MapTip
It has been awhile since I tried this. I would like to add an image to a maptip. I'm using the following code in the Long description:
<img src="http://imaps.srcity.org/img/Windsor/GP_{GP}.pdf"/>
When I click on the map, I get the image below. I can click on the icon and open in a new tab.
_img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=906f2000000XcAz&feoid=Body&refid=0EMf2000000YDvb"_/_img_
0
-
Hi Mike,
Right click the image and select Inspect. Check the source code to see what the image src ends up being set to. It either cannot find it or it was blocked for being mixed content would be my guess.
Regards,Wayne
0 -
I've since set it up as callout style, and right-clicking just gives me map context menu. Before, I could open image in another tab. If I changed to https, it couldn't find. I set back to http, and set to allow unsafe content to true, but that is not helping... 0 -
I can access other images with http, but only if the user clicks on a link. I'm trying to just get this to open with the MapTip... 0 -
If your viewer is launched with https, the image URL should also be https, the browser will block it if it isn't.
On the context menu page, you can temporarily turn off the context menu using the "Map Context Menu" and unchecking "Enable Context Menu". This will allow you to right click and inspect the URL it is using. The replacement token may be missing.
The "console" in the dev tools may also contain an error that will help.
Regards,Wayne
0 -
It is filling in the variable. The site is open at
https://maps.srcity.org/Html5Viewer/Index.html?viewer=County&layerTheme=Windsor&Center=6332000,1961000&Scale=38400
use twplan and windsor to login.
The Windsor General Plan layer is setup with a maptip, one with https and one with http. right-clicking on each - it is possible to open the http version, but the other gives 404 error...0 -
I believe it's a binding issue in IIS. I get the same issue when accessing the links directly in a new browser window so I don't think it's a Geocortex issue per se. I found this explanation -
Usually if you have different results for non-SSL vs. SSL it means that the SSL entry for the IP address that the domain points to is bound to a different website entry within IIS. Double-check that the IP is assigned to the same entry in IIS all around.
Can you check the bindings in IIS Manager to make sure they point to the same server?
Regards,
Wayne0 -
Wayne, the server guys said they did what you asked. When I add it as https, it still just gives a broken image icon, if I then ask to open in a different tab, it now works instead of the 404 error I was getting before. When I inspect, it shows as https. 0 -
Hi Mike,
I see that as well, the URL is now valid but I am afraid the format is not. Are all the images PDF format? PDF is not a valid image format for the HTML "img" tag. Examples of supported img formats : JPEG, GIF, PNG, BMP.
Do you have the same PDF's in a supported image format that you can use?
Regards,
Wayne0 -
Okay, converted one to PNG and that worked. Do you have a sense of what format would be best? Also, I'm trying to expand the size of the maptip to contain the full image - I could make it bigger, but not big enough - is there a max size? 0 -
How did you make the map tip larger, via custom CSS?
That region would have a max size, I believe it's 650X350 but I would need to verify that.0 -
In the feature long description
<img src="https://imaps.srcity.org/img/Windsor/GP_{GP}.png" style="width:650px; height:350px;"/>
It seems more square than that, though0 -
That would control the image size but the map tip container could be changed using CSS. Something like:
.map-tip-view {
width: 60em;
}
but you would need to experiment with the number.0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
12 kommentarer