Hi,
Could you provide me the image format used for the cloud popup, I would like to customize it. I know that I can get it form your theme / img folder but I need to understand how it is working.
thanks in advance.
Cloud Popup image format
Hi Jm,
At first, I want to explain how the theme folder generated for
both web edition and mvc edition. We have integrated all the resources like
images in the MvcEdition.dll and when we request the map page at the first
time, it will create a theme folder in the website and fill the resources
images and style.css into it. But this is just happened in the first request in
your web application.
Actually, In Mvc or Web Edition, The could popup is using the
FramedCloud from Openlayers, we can see this at around line 774 in
helper_GeoResource.axd file
else if (json.popupType == 'CloudPopup') {
this.element =
new OpenLayers.Popup.FramedCloud(json.id, lonlat, size, json.html, anchor,
json.closable);
this.setAlphaChanel();
}
Then, after checking the FramedCloud source code, we can see
there is a property called imageSrc and its value refers to
cloud-popup-relative.gif which is in the theme folder I mentioned before.
Besides, from the FramedCloud source codes in openlayer libraries, we can also
see how they use the image and cut the part of the image by offset.
The simplest way I guess is replacing the image with a custom
image, but I am afraid you need to pay more attentions on all kinds of offsets as the image is not a single image but a combination of several images. More details please have a look on the FramedCloud source code.
Thanks,
Johnny
FramedCloud.js (8.33 KB)