[OpenLayers-Users] Support for Cursors?
bartvde at osgis.nl
bartvde at osgis.nl
Thu Jul 2 01:52:52 EDT 2009
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
>
More information about the Users
mailing list