[OpenLayers-Dev] Select Feature - programatically select - doesn't check if feature is already selected

2009-08-06 Thread Ivan Grcic
If we do several times:

selectContorl.select(feature)

feature is added to layer.selectedFeature array several times.

Should we first check  if the feature is allready selected (ill open a ticket)

if (OpenLayers.Util.indexOf(layer.selectedFeatures, feature) == -1) {
this.select(feature);
}

Or we leave selectControl as it is, and leave this to user to solve it
on application level?

Regards

-- 
Ivan Grcic
___
Dev mailing list
Dev@openlayers.org
http://openlayers.org/mailman/listinfo/dev


Re: [OpenLayers-Dev] somewhat dumb question

2009-08-06 Thread Jerome Freyre

If you define your wms/wfs with a localhost url, it will not work because the
remote try to access the wms service on itself.

So you have to define the wms layers with an IP or a domain name.

Exemple: 
var wms = new OpenLayers.Layer.WMS( OpenLayers WMS, 
http://labs.metacarta.com/wms/vmap0?;, {layers: 'basic'}); 


Sincerly,
Jérome


keithlegg wrote:
 
 I am new to all of this . I have a working fgs server on linux and a msw4
 server on windows. I have openlayers and mapserver running and all is well
 except for one thing. The nice pretty webpages I build show up fine on the
 server machine but when viewed from a remote machine , they alll show up
 as pink tiles. I read around a little , is this fixed with a proxy?  Also
 on a slightly different subject does python mapscript work with openlayers
 ?  Does any python work with openlayers? I am a huge python person and
 would love to keep it in the python world as much as possible. 
 
 Thanks to anyone who can take the time to help me out here.
 
 Keith
  
 

-- 
View this message in context: 
http://n2.nabble.com/somewhat-dumb-question-tp3394910p3397387.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.
___
Dev mailing list
Dev@openlayers.org
http://openlayers.org/mailman/listinfo/dev


Re: [OpenLayers-Dev] Select Feature - programatically select - doesn't check if feature is already selected

2009-08-06 Thread Alexandre Dube
Hi Ivan,

Do you have an example showing when this can happen ? I've been playing 
with the SelectFeature control and can't figure how you can have the 
same feature added 2 times to the layer.selectedFeatures array, unless 
you do it manually.

Regards,

Alexandre

Ivan Grcic wrote:
 If we do several times:

 selectContorl.select(feature)

 feature is added to layer.selectedFeature array several times.

 Should we first check  if the feature is allready selected (ill open a ticket)

 if (OpenLayers.Util.indexOf(layer.selectedFeatures, feature) == -1) {
 this.select(feature);
 }

 Or we leave selectControl as it is, and leave this to user to solve it
 on application level?

 Regards

   


-- 
Alexandre Dubé
Mapgears
www.mapgears.com

___
Dev mailing list
Dev@openlayers.org
http://openlayers.org/mailman/listinfo/dev


Re: [OpenLayers-Dev] Select Feature - programatically select - doesn't check if feature is already selected

2009-08-06 Thread Ivan Grcic
Yep, im calling select manually (programatically)

On Thu, Aug 6, 2009 at 2:30 PM, Alexandre Dubead...@mapgears.com wrote:
 Hi Ivan,

 Do you have an example showing when this can happen ? I've been playing with
 the SelectFeature control and can't figure how you can have the same feature
 added 2 times to the layer.selectedFeatures array, unless you do it
 manually.

 Regards,

 Alexandre

 Ivan Grcic wrote:

 If we do several times:

 selectContorl.select(feature)

 feature is added to layer.selectedFeature array several times.

 Should we first check  if the feature is allready selected (ill open a
 ticket)

 if (OpenLayers.Util.indexOf(layer.selectedFeatures, feature) == -1) {
    this.select(feature);
 }

 Or we leave selectControl as it is, and leave this to user to solve it
 on application level?

 Regards




 --
 Alexandre Dubé
 Mapgears
 www.mapgears.com





-- 
Ivan Grcic
___
Dev mailing list
Dev@openlayers.org
http://openlayers.org/mailman/listinfo/dev


Re: [OpenLayers-Dev] somewhat dumb question

2009-08-06 Thread keithlegg

Thanks, That worked. I figured it was something simple. 


Jerome Freyre wrote:
 
 If you define your wms/wfs with a localhost url, it will not work because
 the remote try to access the wms service on itself.
 
 So you have to define the wms layers with an IP or a domain name.
 
 Exemple: 
 var wms = new OpenLayers.Layer.WMS( OpenLayers WMS, 
 http://labs.metacarta.com/wms/vmap0?;, {layers:
 'basic'}); 
 
 
 Sincerly,
 J�©rome
 
 
 keithlegg wrote:
 
 I am new to all of this . I have a working fgs server on linux and a msw4
 server on windows. I have openlayers and mapserver running and all is
 well except for one thing. The nice pretty webpages I build show up fine
 on the server machine but when viewed from a remote machine , they alll
 show up as pink tiles. I read around a little , is this fixed with a
 proxy?  Also on a slightly different subject does python mapscript work
 with openlayers ?  Does any python work with openlayers? I am a huge
 python person and would love to keep it in the python world as much as
 possible. 
 
 Thanks to anyone who can take the time to help me out here.
 
 Keith
  
 
 
 

-- 
View this message in context: 
http://n2.nabble.com/somewhat-dumb-question-tp3394910p3399469.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.
___
Dev mailing list
Dev@openlayers.org
http://openlayers.org/mailman/listinfo/dev