Discussion utilisateur:Dschwen

Une page de Wikipédia, l'encyclopédie libre.
Aller à : navigation, rechercher

KML WikiMIniAtlas[modifier | modifier le code]

Hello Jack ma, could you add the KML template to an article (I don't want to screw anything up). Then I can commence adding the french wp to the KML support in WikiMiniAtlas. --Dschwen (d) 27 octobre 2012 à 05:04 (CEST)

Fait Done, in Ligne CFD Angoulême - Matha.
Btw, Modèle:Side box may exist with another name (?), see Stade olympique de Montréal when clicking the globe on the Coord upper right (WikiMiniAtlas). Jack ma ►discuter 27 octobre 2012 à 07:18 (CEST)
Why don't you just use action=raw in télécharger au format KML? We'll have to somewhat unify the en and fr KML templates otherwise I'll have to write different code to detect the template for each wiki. Adding a span wrapper with a distinct class, such as class="kmldata" would be very helpful. --Dschwen (d) 28 octobre 2012 à 16:35 (CET)
In fact, both {{KML}} and {{GeoGroup}} exist, contrarily of wiki:en where KML redirects to GeoGroup. So I put {{GeoGroup}} instead; I hope it is ok. I cannot be of more help unfortunately. But the aim is to detect and configure {{KML joint}}, not {{KML}} isn't it ? Please feel free to modify on wiki:fr by such a way WMA works; I leave it to you. Jack ma ►discuter 28 octobre 2012 à 17:42 (CET)
KML joint is substantially different from KML. The toolserver kml export script is not needed for KML joint. --Dschwen (d) 28 octobre 2012 à 18:21 (CET)
Ok, I got the template to look right, but the translation needs some more love :-). I have also laid the foundation to add this to WMA on french WP. More tomorrow. --Dschwen (d) 29 octobre 2012 à 04:36 (CET)
Yes, super ! The template now works with Google Maps and download or edit KML. (Translation for "Route": "Itinéraire" or "Tracé"). Jack ma ►discuter 29 octobre 2012 à 21:12 (CET)
Will it be possible to have the route displayed in a map, but clicking on a upper-right globe in Coord like in Stade Olympique de Montréal or en:Bridgwater and Taunton Canal ?
Anyway, it is already a very nice feature, many thanks again. Jack ma ►discuter 30 octobre 2012 à 07:13 (CET)
Bing doesn't work: endless rotating wheel (on wiki:en either). Btw, in en:Bridgwater and Taunton Canal, clicking on the globe doesn't show the KML path anymore; a few days ago, it was working fine (or was it OSM path ? so WikiMiniAtlas has nothing to do with KML ?). Jack ma ►discuter 30 octobre 2012 à 09:46 (CET)
Absolutely, I'm already working on WMA do do that on fr as well. --Dschwen (d) 30 octobre 2012 à 16:29 (CET)
Voila! Should be working now :-) --Dschwen (d) 30 octobre 2012 à 17:12 (CET)
Unfortunately, I can see the Earth icon on top right, it opens an OSM map, but only a red point appears, not blue lines (see Ligne CFD Angoulême - Matha, or en:Bridgwater and Taunton Canal where I did see these lines last month. Could you fix it ? Jack ma ►discuter 10 novembre 2012 à 14:36 (CET)
hmmm,I still see the blue lines.which browser are you using?--Dschwen (d) 10 novembre 2012 à 15:13 (CET)
I use Firefox 3.0.5. (with "monobook" for WP). With Internet Explorer the globe in the coordinates does not appear (a script error occurs). Jack ma ►discuter 10 novembre 2012 à 17:23 (CET)
3.0.5 is pretty old. I'll see if I can find that version for testing. IE should not give an error I'm testing regularly wit it. whicj IE version is tha? --Dschwen (d) 10 novembre 2012 à 17:32 (CET)
7.0 I'm afraid... I am not 100% sure I saw those blue lines here on my PC :-|. Jack ma ►discuter 10 novembre 2012 à 17:56 (CET)
Unfortunately IE7 is not supported for this functionality. The browser does not support things like the canvas element, which I use to draw the overlays. Adding a IE specific drawing method would be too much work for me (and the majority of users would not benefit from that). But FF3.0.5 shuld work. And as I said I support IE for most of the other functionality, and I try to make it degrade gracefully (that means there shpould not be script errors). I will investigate this. --Dschwen (d) 10 novembre 2012 à 18:15 (CET)

Hello Daniel. I don't understand your slight correction on wiki:en. Does it apply on wiki:fr, too ?
I'm thinking of adding internal links (m, h, d) in the box instead of (modifier) (= edit), to get access to the history of the KML page, and talk page as well, I think it is important, isn't it ? Jack ma ►discuter 11 novembre 2012 à 17:38 (CET)

The change uses the recommended way of referring to internal pages. You should do the same on your template. I think adding the m,h,d links is a good idea. --Dschwen (d) 11 novembre 2012 à 23:13 (CET)
In fact I don't understand this not visible <div class="kmldata" title="Template:Attached_KML/{{PAGENAME}}" style="display:none;"> [[Template:Attached_KML/{{PAGENAME}}]]</div> at the end of the "switch" displaying all things. What is this class "kmldata" ? Jack ma ►discuter 13 novembre 2012 à 07:19 (CET)
This is part helps me detecting the presence of the template in the final rendered HTML of the page using a so called CSS selector. This is much faster and simpler than searching and matching a link URL. It is absolutely necessary that this part stays in the template code. --Dschwen (d) 13 novembre 2012 à 15:13 (CET)
I tested this with Firefox 3.6.3, the oldest I could find, and the KML display works just fine. I still have to see if I can find an IE7 to test with. --Dschwen (d) 12 novembre 2012 à 23:56 (CET)