[OpenLayers-Users] GeoRSS with original Markers

Ishikawa Hiroshi ishikawa at geowork.co.jp
Mon Jan 22 21:05:13 EST 2007


Hi Simon and Yves

Thanks for your advice.

On Mon, 22 Jan 2007 19:30:33 +0900, Yves Jacolin <yjacolin at free.fr> wrote:

> Hi,
>
> Here how I manage this :
> Replace this line :
> /***********
> var iconSize = new OpenLayers.Size(10,17);
> var iconOffset = new OpenLayers.Pixel(0,0);
> /**********
> by :
> /********
>             var icon, iconSize, iconOffset;
>             var data = new Object();
>             var url = "wrote her an url to the icon";
>             if (url != null) {
>                 data.icon = new OpenLayers.Icon(url,iconSize,iconOffset);
>             } else {
>                 data.icon = OpenLayers.Marker.defaultIcon();
>
>                 //allows for the case where the image url is not
>                 // specified but the size is. use a default icon
>                 // but change the size
>                 if (iconSize != null) {
>                    data.icon.setSize(iconSize);
>                 }
>             }
> /*********
>
> To my own purpose, I modify the GeoRSS xml to include an "icon" tag (which is
> not good ;-) and use it as a variable to change the icons for each markers.
>
> If I understood what some people tell in the geoRSS mailing list, it is better
> to use another xml file like SLD to manage this (ie style layer definition).
>
> Regards,
>
> Y.
> Le Lundi 22 Janvier 2007 11:10, Ishikawa Hiroshi a écrit :
>> 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