[OpenLayers-Users] GeoRSS with original Markers

Simon Cantem simon at citysafe.org
Mon Jan 22 05:26:15 EST 2007


Hi Ishikawa,

At the moment the only way to do it is by overriding the Marker
defaultIcon method before you add the GeoRSS layer.

OpenLayers.Marker.defaultIcon = function() {
  var url = "/images/map_icons/purple_marker.png";
  var size = new OpenLayers.Size(12, 20);
  return new OpenLayers.Icon(url, size); };

Unfortunately it'll then change the icon for all GeoRSS layers. On my
list of things to do in my application is to extend the GeoRSS code to
allow for custom marker selection for each GeoRSS layer (which I'll then
commit back to OpenLayers).

Regards,
Simon

-----Original Message-----
From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org]
On Behalf Of Ishikawa Hiroshi
Sent: 22 January 2007 10:10
To: OpenLayers ML
Subject: [OpenLayers-Users] GeoRSS with original Markers

Dear All,

I'm using GeoRSS xml for making markers.
With GeoRSS API, I can use only a red marker icon.
I'd like to use a defferent color or my original icon.
I know I can select an icon when I use Icon API.
But I don't find how to do with GeoRSS API.

Is it possible?
How can I do that?


Thanks,

Ishikawa Hiroshi
ishikawa at geowork.co.jp

_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users



More information about the Users mailing list