Opened 8 years ago

Last modified 6 years ago

#195 new enhancement

mouseposition display in a toolbar

Reported by: fredj Owned by: fredj
Priority: minor Milestone: 1.2
Component: GeoExt Version: trunk
Keywords: Cc:
State: None

Description

Ability to display mouse coords in a toolbar, eg:

var mapPanel = new GeoExt.MapPanel({
    border: false,
    renderTo: "div-id",
    map: {
        maxExtent: new OpenLayers.Bounds(-90, -45, 90, 45)
    },
    bbar: [new GeoExt.ux.Toolbar.MousePosition({
        controlOptions: {
            numDigits: 2
        }
    })]
});

An OL mouse position control is created and added to the map, the coords are displayed in the bbar.

Attachments (2)

195.0.patch (1.3 KB) - added by fredj 8 years ago.
working example. ux ? not ux ? (lazy to create one for < 20 lines ...)
195.1.patch (3.0 KB) - added by fredj 7 years ago.

Download all attachments as: .zip

Change History (11)

Changed 8 years ago by fredj

working example. ux ? not ux ? (lazy to create one for < 20 lines ...)

comment:1 follow-up: Changed 8 years ago by fredj

http://trac.geoext.org/wiki/ux says that "The GeoExt ux are supposed to answer a general customer requirements, but not general enough to be part of GeoExt trunk."

I feel that this feature is general enough to be included in the trunk.

Do you agree ?

comment:2 Changed 8 years ago by tschaub

I think this sounds good for the trunk.

comment:3 in reply to: ↑ 1 Changed 8 years ago by elemoine

  • Milestone set to 1.0

Replying to fredj:

http://trac.geoext.org/wiki/ux says that "The GeoExt ux are supposed to answer a general customer requirements, but not general enough to be part of GeoExt trunk."

I feel that this feature is general enough to be included in the trunk.

Do you agree ?

fredj, during the IRC meeting we agreed that it'd be a useful feature. Please set the milestone back to 0.7 if you can provide a patch in a timely manner for 0.7. Thanks.

comment:4 Changed 8 years ago by ahocevar

See #215 for possible issues when not configuring it with a map. Maybe this should extend GeoExt.Action?

comment:5 Changed 8 years ago by fredj

  • Owner set to fredj

comment:6 Changed 8 years ago by fredj

See if the displayClass should/can be respected

comment:7 Changed 7 years ago by ahocevar

  • Milestone changed from 1.0 to 1.1

Changed 7 years ago by fredj

comment:8 Changed 7 years ago by fredj

195.1.patch adds the GeoExt.Toolbar.ControlDisplay class which is more generic.

This class takes an openlayers control instance, set the div option and add it to the map.

See examples/toolbar.html for an example with mouseposition and attribution.

TODO: comments and unit tests.

comment:9 Changed 6 years ago by ahocevar

  • Milestone changed from 1.1 to 1.2

Batch move of tickets to finish the 1.1 milestone.

Note: See TracTickets for help on using tickets.