[OpenLayers-Users] Unwanted links in GPX data

ANC anajera at bicimapas.com.mx
Tue Mar 18 18:17:48 PDT 2014


Hello,

I have a web page that shows a GPX file over a WMS layer. The page includes
a link that allows users  to download the GPX file shown on the map.  I have
noticed that when such link exists, Openlayers also adds links to the GPX
file in each of the labels it contains.  I do not want those links on the
map as they may create confusion to the user. Could somebody explain why may
this be  happening and how to remove the links from the GPX file labels on
the map?

You can see it in this link:

http://www.bicimapas.com.mx/nvobcmp.html

and the code used for the GPX layer is:

 var gpxStyles = new OpenLayers.StyleMap({
                "default": new OpenLayers.Style({
                    pointRadius: "5", 
                    label: "${name}",        
                    labelAlign: 'cb',
                    fontSize: 9,
                    fontFamily: "Arial",
                    fontColor: "brown",
                    fontWeight: "bold",
                    labelYOffset: 6,
                    fillColor: "yellow",
                    strokeColor: "red",
                    strokeWidth: 3, 
                    strokeOpacity: 1
                })
            }); 
    

var lgpx = new OpenLayers.Layer.Vector("Ruta", {
				strategies: [new OpenLayers.Strategy.Fixed()],
				protocol: new OpenLayers.Protocol.HTTP({
					url: "CHILUCO.gpx",
					format: new OpenLayers.Format.GPX({extractWaypoints: true,
extractRoutes: false, extractAttributes: true})
				}),
				styleMap: gpxStyles,
				projection: map.displayProjection
			});
 

             map.addLayer(lgpx); 

             lgpx.events.register('loadend',lgpx,function() { 
                 var bounds = this.getDataExtent(); 
                 map.zoomToExtent(bounds); 
             }); 


and the code for the link to the GPX file is a simple anchor:


Ruta en GPX <CHILUCO.gpx> 


Any help will be appreciated, thank you





--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Unwanted-links-in-GPX-data-tp5129780.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list