[OpenLayers-Users] Support for Cursors?
Bart van den Eijnden (OSGIS)
bartvde at osgis.nl
Thu Jul 2 11:46:50 EDT 2009
Hi Bill,
not sure, can you check the css class which has been set on the map
viewport div when you activate a tool? They should have those values.
Maybe there is another class which is preventing the cursors from
showing up.
Best regards,
Bart
Bill Thoen wrote:
> Thanks Bart, but for some reason this changes the cursor only over the
> tool buttons on the control panel. How do I make it extend over my map
> window when I change tools?
>
> bartvde at osgis.nl wrote:
>
>> Hi Bill,
>>
>> yes it's in 2.8.
>>
>> You need to add css classes depending on the displayClass + "Active"
>> of a control, e.g. this is what I have:
>>
>> .olControlDragPanActive {
>> cursor: url(lib/openlayers/theme/default/img/pan.cur) 16 16,
>> url(../geoservices2.2/lib/openlayers/theme/default/img/pan.cur), auto;
>> }
>> .olControlZoomBoxActive {
>> cursor: url(lib/openlayers/theme/default/img/zoomin.cur) 9 9,
>> url(../geoservices2.2/lib/openlayers/theme/default/img/zoomin.cur),
>> auto;
>> }
>> .zoomoutActive {
>> cursor: url(lib/openlayers/theme/default/img/zoomout.cur) 9 9,
>> url(../geoservices2.2/lib/openlayers/theme/default/img/zoomout.cur),
>> auto;
>> }
>> .olControlDragPanActive.olDragDown {
>> cursor: url(lib/openlayers/theme/default/img/pandown.cur) 16 16,
>> url(../geoservices2.2/lib/openlayers/theme/default/img/pandown.cur),
>> auto;
>> }
>> .GeoServicesControlSLDSelectActive {
>> cursor: default;
>> }
>> .GeoServicesControlFeatureInfoActive {
>> cursor: pointer;
>> }
>> .olControlMeasureActive {
>> cursor: crosshair;
>> }
>> .olControlDrawFeaturePolygonActive {
>> cursor: crosshair;
>> }
>> .olControlDrawFeaturePointActive {
>> cursor: crosshair;
>> }
>> .olControlDrawFeaturePathActive {
>> cursor: crosshair;
>> }
>> .olControlDrawFeaturePointActive {
>> cursor: crosshair;
>> }
>> .olControlDrawFeaturePathActive {
>> cursor: crosshair;
>> }
>> .olControlDrawFeaturePolygonActive {
>> cursor: crosshair;
>> }
>>
>> Hope this helps.
>>
>> Best regards,
>> Bart
>>
>>
>>
>>> Was support for using different cursor icons (pointer, text, wait, etc.)
>>> built into version 2.8? I didn't see anything about cursors in the
>>> release notes but I thought there had been some work done on this.
>>>
>>> If not, can someone tell me the best place to set the cursor icon for
>>> tool buttons? Is there an "on activate" event I can listen for, or is
>>> there a better way to do this?
>>>
>>> Thx,
>>> - Bill Thoen
>>> _______________________________________________
>>> Users mailing list
>>> Users at openlayers.org
>>> http://openlayers.org/mailman/listinfo/users
>>>
>>>
>>>
>>
>>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
>
--
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde at osgis.nl
http://www.osgis.nl
More information about the Users
mailing list