[OpenLayers-Users] Custom markers

Eric Lemoine eric.c2c at gmail.com
Fri Aug 22 12:20:21 EDT 2008


Hi. If you use externalGraphics do not pass any featureClass to the
WFS constructor. Also check the name of the external graphics prop i
can't remember if there's a trailing s or not. Eric

2008/8/22, Indika Tantrigoda <indika85 at gmail.com>:
> Hi all,
>
> I seem to have some trouble with the following
>
>      var symbolizer = OpenLayers.Util.applyDefaults(
>         {externalGraphic: "./marker-blue.png", pointRadius: 20},
>         OpenLayers.Feature.Vector.style["default"]);
>
>         wfs_test = new OpenLayers.Layer.WFS( "WFS Test",
>                         "http://localhost:8080/geoserver/wfs",
>                         {typename: "topp:cities",
>                          maxfeatures: 10
>                         },
>                         {featureClass: OpenLayers.Feature.WFS,
>                          styleMap: new OpenLayers.StyleMap({
>                                   "default": symbolizer
>                  })}
>           );
>
> I want to replace the default red marker with blue-marker.png
> However I still get the same red marker.
>
> Thanks in advance.
>
> Regards,
> Indika
>
> 2008/8/21 Eric Lemoine <eric.c2c at gmail.com>
>
>> Hi. maxfeatures tells the WFS how many features you want to receive at
>> most. Eric
>>
>> 2008/8/20, Indika Tantrigoda <indika85 at gmail.com>:
>> > Hi all,
>> >
>> > I have managed to display some point data as a WFS layer using
>> >
>> >  wfs_test = new OpenLayers.Layer.WFS( "WFS Test",
>> >                 "http://localhost:8080/geoserver/wfs",
>> >                 {typename: "topp:cities",
>> >                  maxfeatures: 10
>> >                 },
>> >                 { featureClass: OpenLayers.Feature.WFS}
>> >             );
>> >
>> > The points are displayed as markers similar to the examples.
>> >
>> > Would there be any way to have a custom marker instead of the
>> > traditional
>> > one ? I plan to have multiple
>> > point layers (as WFS layers) with different markers for each layer.
>> >
>> > Also what exactly does the maxfeatures: 10 do ?
>> >
>> > Thanks in advance.
>> >
>> > Regards,
>> > Indika
>> >
>>
>



More information about the Users mailing list