Try:
var lgpx = new OpenLayers.Layer.GML("Green", "green.gpx", {
...
style: {strokeColor: "green", strokeWidth: 10, strokeOpacity: 0.5,
pointRadius: 5, fillColor: "green", fillOpacity: 0.5},
...
});
That might get you points on the line as well. The GPX is probably rendering
a Geometry of LineString or MultiLineString type, in which case it may not
draw every point explicitly. If you want to draw a bunch of points, you may
have to pull out the point geometry from that LineString, and add each point
as a discrete feature. Someone correct me if I'm wrong, here.
-z
On Thu, Nov 4, 2010 at 1:18 PM, raphx <[email protected]> wrote:
>
> Hi,
>
> I'm new to Openlayer and Javascript in general. I have a very simple
> question, how to display simple "points" like circles or square on a map
> using coordinates stored in a GPX file. I found an example how to draw a
> line from one entry to the next however I couldn't find any example using
> points. Any idea?
>
> var lgpx = new OpenLayers.Layer.GML("Green", "green.gpx", {
> format: OpenLayers.Format.GPX,
> style: {strokeColor: "green", strokeWidth: 10, strokeOpacity: 0.5},
> projection: new OpenLayers.Projection("EPSG:4326")
> });
>
> map.addLayer(lgpx);
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Display-points-from-GPX-tp5706149p5706149.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users