[OpenLayers-Users] select feature control not working
Imran Rajjad
rajjad at gmail.com
Thu Jun 3 08:14:08 EDT 2010
ok I download the latest and deployed it from my application and now
the map controls are not responding , instead the mouse control has
gone to other divs. I think I have messed it up. I better try to use
the one with GS.. or I think i`ll try to put the new js file in
geoserver
regards,
On Thu, Jun 3, 2010 at 5:07 PM, Andreas Hocevar <ahocevar at opengeo.org> wrote:
> No, if you host your application off GeoServer it is better to place a full version in the www folder of your data dir and not touch the one that is included.
>
> -Andreas.
>
> On Jun 3, 2010, at 13:53 , Imran Rajjad wrote:
>
>> All right and I replace the js file in geoserver directory with the
>> new downloaded? will that be ok?
>>
>> On Thu, Jun 3, 2010 at 4:52 PM, Andreas Hocevar <ahocevar at opengeo.org> wrote:
>>> Hi,
>>>
>>> the OpenLayers versions that ship with GeoServer only include the functionality that is needed for the GeoServer layer preview. Please download a full version from http://openlayers.org
>>>
>>> Regards,
>>> Andreas.
>>>
>>> On Jun 3, 2010, at 13:46 , Imran Rajjad wrote:
>>>
>>>> thanks for your reply
>>>>
>>>> I`m using the one that comes with geoserver 1.7.7 . not too sure about
>>>> the version. But the select and highlight works. When I tried the code
>>>> on my page.. only the highlight control was working with a highlight
>>>> color different from the one in example. Later through console i
>>>> deactivated the highlight control and then activated the select
>>>> control .. then the select control started working .. the events are
>>>> also getting triggered.i was hoping to get to the attributes of the
>>>> feature clicked at.
>>>>
>>>> On Thu, Jun 3, 2010 at 4:31 PM, Eric Lemoine
>>>> <eric.lemoine at camptocamp.com> wrote:
>>>>> On Thu, Jun 3, 2010 at 12:01 PM, Imran Rajjad <rajjad at gmail.com> wrote:
>>>>>> I`m trying to run a function on clicking and highlighting of a vector
>>>>>> layer. the events do not seem to trigger..
>>>>>>
>>>>>> what am i doing wrong here?
>>>>>>
>>>>>> my code
>>>>>>
>>>>>>
>>>>>>
>>>>>> var report = function(e) { // it will be called when event is trigered
>>>>>> from eventListeners
>>>>>> console.log(e.type, e.feature.id);
>>>>>> //alert(e.feature.id);
>>>>>>
>>>>>> };
>>>>>>
>>>>>> var highlightCtrl = new
>>>>>> OpenLayers.Control.SelectFeature(vector_layer, {
>>>>>> hover: true,
>>>>>> highlightOnly: true,
>>>>>> renderIntent: "highlight",
>>>>>> eventListeners: {
>>>>>> beforefeaturehighlighted: report,
>>>>>> featurehighlighted: report,
>>>>>> featureunhighlighted: report
>>>>>> }
>>>>>> });
>>>>>>
>>>>>> var selectCtrl = new OpenLayers.Control.SelectFeature(vector_layer,
>>>>>> {clickout: true}
>>>>>> );
>>>>>>
>>>>>> map.addControl(highlightCtrl); // add high lighting
>>>>>> map.addControl(selectCtrl); // add selection
>>>>>>
>>>>>> highlightCtrl.activate();
>>>>>> selectCtrl.activate();
>>>>>
>>>>>
>>>>> What OpenLayers version do you use? Does the highlight-feature.html
>>>>> example of your OpenLayers distribution work?
>>>>>
>>>>> Cheers,
>>>>>
>>>>> --
>>>>> Eric Lemoine
>>>>>
>>>>> Camptocamp France SAS
>>>>> Savoie Technolac, BP 352
>>>>> 73377 Le Bourget du Lac, Cedex
>>>>>
>>>>> Tel : 00 33 4 79 44 44 96
>>>>> Mail : eric.lemoine at camptocamp.com
>>>>> http://www.camptocamp.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> I.R
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at openlayers.org
>>>> http://openlayers.org/mailman/listinfo/users
>>>
>>>
>>>
>>> --
>>> Andreas Hocevar
>>> OpenGeo - http://opengeo.org/
>>> Expert service straight from the developers.
>>>
>>>
>>
>>
>>
>> --
>> I.R
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
>
>
--
I.R
More information about the Users
mailing list