[OpenLayers-Users] Set Popups on Point Track Markers..
David Calle
davydky at gmail.com
Wed Aug 20 18:31:05 EDT 2008
Hi Dear List...
I'm using the example "Poin Track Markers".
But I need to modify the popups of the Markers...
[1] How can I set the content, because on the example only <title> and
<description> appears.
[2] How can I set the the visual properties(size, transparency, etc)
This is the format of my xml file:
<item>
<geo:lat>-2.8849877900038</geo:lat>
<geo:long>-79.0611279883398</geo:long>
<title>2008-08-01 05:08:48 hrs.</title>
<description>16.540 Km/h.</description>
</item>
So, I want to set the popup content with that.
[3] And Finally , I want to set the Track Visual Properties.. (color, size,
etc).
Thanks..!! =).
PD: this is the code..(Points and Track)
function addUrl()
{
ejecutarsql(OpenLayers.Util.getElement('unidad').value);
var urlObj = OpenLayers.Util.getElement('url');
var value = urlObj.value;
var parts = value.split("/");
rss = new OpenLayers.Layer.GeoRSS(parts[parts.length-1],
value);
rss.events.register("loadend", window, populateMap);
map.addLayer(rss);
}
function populateMap()
{
var lineLayer = new OpenLayers.Layer.PointTrack(rss.name + "
Track",
{dataFrom:
OpenLayers.Layer.PointTrack.dataFrom.SOURCE_NODE});
lineLayer.addNodes(rss.features);
map.addLayer(lineLayer);
rss.setName("Points");
var feature, marker;
for (var i = rss.features.length-1; i>0; i--)
{
if
(rss.features[i].data.popupContentHTML.indexOf("Untitled")!= -1)
{rss.removeMarker(rss.markers[i]);}
}
map.raiseLayer(rss, 1);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080820/def81803/attachment.html
More information about the Users
mailing list