Hi Stefan,<div><br></div><div>It's work very well :-))))))</div><div><br></div><div>I'm glad, I'm so glad.</div><div><br></div><div>Many Thanks.</div><div><br></div><div>Christian</div><div><br></div><div><br></div><div><div>Le 27 juin 2012 à 15:00, Stefan Simon [via OSGeo.org] a écrit :</div><br class="Apple-interchange-newline"><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' type="cite">

        Hello.<br><br>This is my code:<br><pre>var gpxStyles = new OpenLayers.StyleMap({
                "default": new OpenLayers.Style({
                    pointRadius: "5", // sized according to type attribute
                    label: "${name}",        
                    labelAlign: 'cb',
                    fontSize: 9,
                    fontFamily: "Arial",
                    fontColor: "red",
                    labelYOffset: 6,
                    fillColor: "brown",
                    strokeColor: "yellow",
                    strokeWidth: 2, 
                    strokeOpacity: 1
                }),
                "select": new OpenLayers.Style({
                    fillColor: "#66ccff",
                    strokeColor: "#3399ff",
                    graphicZIndex: 2
                })
            }); <br></pre><pre>var __gpx_layer = new OpenLayers.Layer.Vector("gpx_layer", {
                                        protocol: new OpenLayers.Protocol.HTTP({
                                            url: "path_to_gpx/gpx_file.gpx",
                                            format: new OpenLayers.Format.GPX({extractWaypoints: true, extractRoutes: false, extractAttributes: true})
                                        }),
                                        strategies: [new OpenLayers.Strategy.Fixed()],
                                        visibility: false,
                                        styleMap: gpxStyles,
                                        projection: new OpenLayers.Projection("EPSG:4326")
                                    });</pre><br><br><div class="gmail_quote">On Wed, Jun 27, 2012 at 2:12 PM, christian bleau <span dir="ltr"><<a href="x-msg://34/user/SendEmail.jtp?type=node&amp;node=4984219&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span> wrote:<br>
<blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' style="border-left:2px solid #CCCCCC;padding:0 1em" class="gmail_quote">Hi,<br>
<br>
Is there someone who  can help me to understand how can I get the label<br>
"name" or "others" from gpx's file?<br>
<br>
I try this code without succes ;(<br>
<br>
var context =   {<br>
                pointLabel: function(feature) {<br>
               return feature.attributes['name'] + " (" +<br>
feature.attributes['name'] + ")";<br>
                }};<br>
<br>
var lgpx = new OpenLayers.Layer.GML("GPX", "http:// ****** test_gpx.gpx", {<br>
                format: OpenLayers.Format.GPX,<br>
                style: {<br>
                strokeColor: "green",<br>
                fillColor: "orange",<br>
                graphicName: "triangle",<br>
                label: "${name}",<br>
                 pointRadius: 6,<br>
                 strokeWidth: 2,<br>
                 strokeOpacity: 0.5,<br>
                 fillOpacity: 0.5},<br>
                 context: context,<br>
                 projection: new OpenLayers.Projection("EPSG:4326")<br>
                        });<br>
                map.addLayer(lgpx);<br>
<br>
If you have any examples or ways.<br>
<br>
Thank a lot.<br>
<br>
Christian<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.n6.nabble.com/How-get-gpx-label-tp4984193.html" target="_blank" rel="nofollow" link="external">http://osgeo-org.1560.n6.nabble.com/How-get-gpx-label-tp4984193.html</a><br>
Sent from the OpenLayers Users mailing list archive at <a href="http://Nabble.com" target="_top" rel="nofollow" link="external">Nabble.com</a>.<br>
_______________________________________________<br>
Users mailing list<br>
<a href="x-msg://34/user/SendEmail.jtp?type=node&amp;node=4984219&amp;i=1" target="_top" rel="nofollow" link="external">[hidden email]</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank" rel="nofollow" link="external">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>______________<br>Simon Stefan<br>
<br>_______________________________________________
<br>Users mailing list
<br><a href="x-msg://34/user/SendEmail.jtp?type=node&amp;node=4984219&amp;i=2" target="_top" rel="nofollow" link="external">[hidden email]</a>
<br><a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_top" rel="nofollow" link="external">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
        
        <br>
        <br>
        <hr noshade="noshade" size="1" color="#cccccc">
        <div style="color:#444; font: 12px tahoma,geneva,helvetica,arial,sans-serif;">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://osgeo-org.1560.n6.nabble.com/How-get-gpx-label-tp4984193p4984219.html" target="_top" rel="nofollow" link="external">http://osgeo-org.1560.n6.nabble.com/How-get-gpx-label-tp4984193p4984219.html</a>
        </div>
        <div style="color:#666; font: 11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                
                To unsubscribe from How get gpx label?, <a href="" target="_top" rel="nofollow" link="external">click here</a>.<br>
                <a href="http://osgeo-org.1560.n6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_top" link="external">NAML</a>
        </div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Console'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Console'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Console'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Console'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Christian</div><div><br></div><div><a href="http://www.pofableau.com/" target="_top" rel="nofollow" link="external">Pof@Bleau</a></div><div><br></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br>
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1560.n6.nabble.com/How-get-gpx-label-tp4984193p4984332.html">Re: How get gpx label?</a><br/>
Sent from the <a href="http://osgeo-org.1560.n6.nabble.com/OpenLayers-Users-f3910695.html">OpenLayers Users mailing list archive</a> at Nabble.com.<br/>