Template talk:Superimpose

Really neat and wikistyle idea
A really neat and wikistyle idea. This was discussed on the german WP before (with bitmap superimpose using css) but dismissed, since the resulting pictures cannot easily be saved on a local harddrive by users. --Dschwen 07:57, 3 November 2005 (UTC)
 * Yes, it's designed for use within Wikipedia pages, not as a tool for generating new downloadable images. Why did users want to download them? There may be other ways to do that, if it's a useful feature. &mdash;Papayoung &#9775; 15:54, 3 November 2005 (UTC)

Great template! Template:Location on map is similar, except it has a frame and caption as with the "|thumb" image syntax (e.g. at Vail, Colorado). dbenbenn | talk 00:55, 22 November 2005 (UTC)
 * One highly annoying thing about this template is that the unit, px, is built in to the x and y parameters, but not the width parameters. dbenbenn | talk 05:15, 14 February 2006 (UTC)

Hi, if you like superimposing things, i've created the Template:Superimpose-text to superimpose wikitext to an image (including liks and that stuff). I guess more then an user will like this for his/her own page and userboxes. --Argentino (talk/cont.) 18:54, 1 May 2006 (UTC)

New template from the German wiki
On the German wiki, a new approach to this has come out: Lageplan, which can be placed inside another template and, with a bit of extra work, can place a point on a map given the geographical co-ordinates. It has been directly copied to the English wiki for use in the new template Infobox German Location. The text for Lageplan is still in German, but you get the idea. For an example, see Cologne. It has also been successfully implemented in Infobox Town GR (eg. Heraklion). - 52 Pickup 08:19, 10 January 2007 (UTC)
 * I'm not sure how that would assist the protected areas articles which uses this infobox...could you provide an example of how it might appear by using an infrequently edited article, for example Great Bear Wilderness?--MONGO 12:52, 10 January 2007 (UTC)
 * Unforuntaely I don't have time to come up with an example at the moment. But I think the core idea is that you need to come up with the mathematical equation that translates the geographical co-ordinates to the loc_x / loc_y values for a given map. (while this template uses pixels, Lageplan uses a relative 0-100 scale). - 52 Pickup 13:54, 10 January 2007 (UTC)


 * Lageplan has parameters with default values (loaded when the parameters are not specified), and uses a re-scaling algorithm. superimpose adds "px" to the x and y parameters. A template with % instead of px would probably be more flexible (in terms of image size). Or even one where the position can be entered either way (x=34px y=100px or x=20% y=35%).
 * [[Image:| replaced with [[Image:| would default to those values when they are not specified. This however, can be better done in the templates that use superimpose. --[[User:Qyd|Qyd]] 17:30, 10 January 2007 (UTC)

Location map
After discussing Lageplan above, I have just discovered Location map which already supports various maps. Check it out. - 52 Pickup 09:39, 24 January 2007 (UTC)

Frame
A random tip... It's possible to use imageframe to add a frame around a superimposed image, to make it look more like a normal image. See for example the Pilottown, Louisiana article. Also, if someone is feeling eager, it might be possible for the superimpose template to directly call imageframe itself, possibly optionally. --Interiot 19:08, 12 March 2007 (UTC)

Fix width for surrounding &lt;div&gt;
editprotected

Please change the first line from {{ to {{ This is based on the problem raised [http://en.wikipedia.org/wiki/Wikipedia:Village_pump_%28technical%29#Location_map_dot__varies_location_between_Firefox_and_IE.3B_one_correct.2C_one_not. here] at WP:VPT. If the base image is centered within a table cell, the red dot appears off to the left because the surrounding &lt;div&gt; covers the entire table cell and not just the image. –Pomte 21:02, 27 April 2007 (UTC)
 * {{tick}} Done. --ais523 08:27, 30 April 2007 (UTC)

Problem with functinality
I have noticed that if the base_width field is used to change the display size of the base image then the float image appears in the wrong location. The float_caption and base_caption fields are not functioning. See examples below:



Notice that the float is somewhere in Oklahoma 

This kludge works but it can't be implemented in the template until the height and width of the original image and the height and width of the resised image can be found. I think more about that latter unless someone else does it first.



x = y =

Since I think x and y are colculated based on the width of 288px and the height of that image is 230px and we know the new width maybe we are ok already.

Question: are all maps of this size? Question are all original maps in svg format? Where to the png maps come from and why?

-- droll  &#91;chat&#93;  12:24, 9 March 2009 (UTC)

Add support for alt text
editprotected As per WP:ALT, for WP:ACCESSIBILITY by the visually impaired, it should be possible to specify alt text for images generated by this template. I've implemented this in the sandbox with this sandbox edit, which adds float_alt= and base_alt= parameters for the two images. I have tested the sandbox version with the test case, and have updated the documentation to describe the new version. Can you please install the change into the main version? Thanks. Eubulides (talk) 01:11, 16 July 2009 (UTC)


 * ✅ Hers fold  (t/a/c) 00:44, 17 July 2009 (UTC)

Accessibility improvement
Following up on the previous request, it turns out that the typical use of this template should specify alt text once, for the combination for the images, rather than have a separate bit of alt text for both images. The W3C suggests that, in this case, one supplies alt text for the first (base image) only.

I ran into this problem when reviewing the WP:ACCESSIBILITY of the featured article candidate Upper and Lower Table Rock. Its infobox uses Infobox protected area, which needs an accessibility fix (see Template talk:Infobox protected area ; in order to get that to work, Superimpose needs to be extended so that the caller can specify the link parameter of the image syntax, and so that the caller can specify an empty caption for the floating image. The default link should be empty for the floating image, to support the usual case of a small marker floating over a large base image, where the marker should not be announced separately to the visually impaired reader. This default can be overridden by specifying a new float_link parameter. Similarly, there's a new base_link parameter for the base image, which defaults to the file page for the base image.

I've implemented this in the sandbox, and have documented it; could you please install ? Thanks. Eubulides (talk) 07:54, 17 October 2009 (UTC)
 * ✅, thanks for your ever-clear editrequests :) Skomorokh,  barbarian  08:35, 17 October 2009 (UTC)

Add 2nd layer of superimposition
The JA version of this template has already been implemented the 2nd layer of superimposition and is put into practical use. The EN version should follow it as well or further extends it to support more layers, say over 50 layers.

Testing sandbox:
 * user:sameboat/x7 (template superimpose)
 * user:sameboat/sandbox

-- Sameboat - 同舟 (talk) 23:03, 24 July 2009 (UTC)

Fix alt text
editprotected

New code is in the sandbox. I fixed alt text for the base image. The |alt= field only works for thumb images. The fix is a bit messy because I assume that both base_alt and base_caption are in use. In the sandbox version the two fields are synonymous but base_alt takes priority.

Neither float_alt or float_caption are functional and I don't know why. – droll  &#91;chat&#93;  20:50, 3 February 2010 (UTC)


 * Sorry, I don't see why the new code is an improvement. Among other things, it breaks the test case in Template:Superimpose/testcases. In that test case, United States Locator Map works in the installed version (that text is put into the title text, and works as a tooltip with most browsers), but it doesn't work in the sandbox version (the title text is a copy of the alt text, which is not what's wanted). Can you please give an example of where this change is needed? Eubulides (talk) 03:46, 4 February 2010 (UTC)


 * Slightly off-topic. Does that mean the caption will act as the  attribute for pop-up tooltips meesage? -- Sameboat - 同舟 (talk) 04:37, 4 February 2010 (UTC)
 * Yes, as described in WP:PIC . Eubulides (talk) 08:04, 4 February 2010 (UTC)

After some research I see that Eubulides is on the right side in this. When the courser is over the base image the text set by the  attribute (what we commonly call the caption) is displayed as a tool tip. The only way to see the  text is to use the browsers image properties feature. So I'll let the browser developers worry about whats best for the visually impaired. text for the pog can be viewed in the same manor but I have not found a way to display the  text. To avoid confusion I synchronized the sandbox with the active template. – droll  &#91;chat&#93;  13:28, 4 February 2010 (UTC)

Problem on Internet explorer
I just noticed that the marker (dot) is lower when using IE than with Firefox, Chrome, Safari or Opera. I kinda think this is a problem. It could related to attribute inheritance which is not supported by any version of IE but is by the other four. I'm not sure if it is worth spending time to try to fix this issue. Any opinions?&ensp;– droll  &#91;chat&#93;  02:55, 13 February 2010 (UTC)

Does the parameter do anything?
In the HTML source code for this version of the sandbox, I can't find the the value assigned to. Is the parameter ignored by the parser? – droll  &#91;chat&#93;  07:59, 24 September 2010 (UTC)

Caption and alt parameters
I've been working on an update for this template. There are two changes I'm making to other templates that transclude this template. I sorry if this explanation isn't clear. If you see something that you think is a mistake please leave a note here or on my talk page. – droll  &#91;chat&#93;  06:07, 4 October 2010 (UTC)
 * 1) The parser generates no HTML for values assigned to the float_caption and float_alt parameters. I'm removing these parameters from transcluded templates.
 * 2) Currently the value assigned to base_caption produces no visible output and because of the way this template handles alt text the value assign base_caption does not function as alt text as is the case with the extended image syntax. I'm going tweak the templates so that the value currently assigned to base_caption will be used as alt text.


 * Caption is actually misleading here, as it is actually  in nature. It serves as the mouse-over popup tool tips. As for   attribute, please read wp:alt. Also I have added the   parameter in superimpose2, it's useful if the base image itself has extremely pale background and hard to be distinguished from the homepage background. -- Sameboat - 同舟 (talk) 06:28, 4 October 2010 (UTC)


 * Sorry. I'm reverting the edits I made. – droll  &#91;chat&#93;  06:30, 4 October 2010 (UTC)

Update request
Please paste the sandbox version into the active template. Please change template sandbox notice to documentation.

The change allows the base image caption to act as alternative text if none is supplied. See WP:EIS and WP:ALT. I wrote some test cases. No difference in output will be seen using a web browser. The changes can be checked by examining the HTML or by using a screen reader.

I added some comment tags to improve the readability of the code. Thanks. – droll  &#91;chat&#93;  06:53, 7 October 2010 (UTC)


 * The caption should really be visible: right now it's simply acting as title text, which isn't right. (There are some troubling things in WP:ALT right now, such as the assertion that "see adjacent text" is a good choice of alt text, but I'll deal with them at WT:ALT.) I've edited the sandbox code to make the captions visible; this matches the display of similar templates. Thoughts? Chris Cunningham (user:thumperward: not at work) - talk 09:36, 9 October 2010 (UTC)


 * This template is used in Infobox templates that already have code to display a caption below the map. My edit request was very straight forward. Please don't added captions. Currently what is in the sandbox is not the edit I requested. I think what is now in the sandbox is too drastic a change. My simple intention was to make the template conform with the Extended image syntax which, incidentally, does not display a caption below the an image unless it is a thumb. Because of the way the template is currently coded if no alt text is supplied the caption text does not act as alt text as is default case with the image syntax. I think any changes made to the template that are visible should be carefully evaluated so that they do not break pages that currently use the template. People who coded other templates, such as Infoboxes, expected this template to behave as it does now. I would rather see no changes made than those proposed in the sandbox. – droll  &#91;chat&#93;  21:57, 9 October 2010 (UTC)
 * Yes, seriously...this is used in over a hundred articles I started..it's a bit cumbersome, but does a good job of providing a basic display location...it works well for various maps as in Chalco Hills Recreation Area and Bob Marshall Wilderness--MONGO 22:32, 9 October 2010 (UTC)


 * From what I can tell, every time this is called by another template (as with infobox protected area), the template in question could (and probably should) be using location map instead. Why is this a separate template in the first place? Chris Cunningham (user:thumperward: not at work) - talk 02:55, 11 October 2010 (UTC)


 * Obviously not. Although some user was using Superimpose which can be substituted by location map, there're still occasions that the superimposition is applied apart from indicating position on the map. Previously this template was transluded by the ROUTE project for combining new icons from basic icon images, though it is now substituted by superimpose2. -- Sameboat - 同舟 (talk) 04:14, 11 October 2010 (UTC)

Position = ?
In some languages (like finnish and spain) template has "position = right" -option to allign image easily on right edge. Can you pls add this feature to the template. Now it seems one must use

{ | style="float:right; clear:right;"
 * }
 * }

--RicHard-59 (talk) 16:55, 13 March 2011 (UTC)

The float_caption option is non functional
I noticed that text assigned to  does not work as advertised and, in fact, generates no HTML code.&#32;– droll   &#91;chat&#93;  23:40, 28 July 2011 (UTC)


 * I'm working on fixing this. My view is that this template should treat the,  , and   parameters the same way that the [[File:name]] extension does and that is documented at Extended image syntax. Changes to the markup would not change the templates output in any other way. If anyone has any comments or objections I would be interested.&#32;– droll   &#91;chat&#93;  02:03, 29 July 2011 (UTC)
 * It is caused by voiding of "link" attribute if no entry given to float_link parameter. This is done intentionally as per wp:ICON. But disabling tooltip altogether is worth reporting to bugzilla. Adding  after   should do it but I don't recommend it. -- Sameboat - 同舟 (talk) 02:18, 29 July 2011 (UTC)


 * I don't think it is a bug. In the my sandbox version,  is used as the title of the div that contains the dot image. I works fine. Take a look at the testcases. The   bit look like some kind of kludge. Tomorrow I'll work up a version that conforms to the [[File:name]] extension that I mentioned above. Note that the my sandbox version is far from complete. For example, the   text should work as the title if there is no   value defined. The way the alt text works does not conform either.

New version in the sandbox
I put some new markup in the sandbox. Take a look at the testcases. Caption, link and alt text output matches that of the File: syntax. Please make any comments you have promptly as I'll request that the template be updated if there are no unresolved objections.&#32;– droll  &#91;chat&#93;  06:20, 7 August 2011 (UTC)

Attribution and the link parameter
While working on this update I was reminded that, if an image file requires attribution, the link to the image description page should not be suppressed "unless attribution is provided in some other fashion." See Extended image syntax. Many images, including many map images, do not require attribution as they are in the public domain. Some, such as US Locator Blank.svg, do require attribution.&#32;– droll  &#91;chat&#93;  06:20, 7 August 2011 (UTC)


 * In an effort to simplify attribution, I added an optional parameter in the sandbox version that displays an information icon with a link to the image description page for the base image. This does not address the issue of what to do when an editor wants to link form the superimposed image. The option is functional when the base image links somewhere else and only useful if the base image requires attribution. This method is borrowed from the clickable version of US Locator Blank.svg and can be seen on the image description page.&#32;– droll  &#91;chat&#93;  18:52, 7 August 2011 (UTC)

Superimposing cropped images
Is it possible to superimpose images that are cropped using CSS image crop? Jarble (talk) 15:49, 4 May 2024 (UTC)