[Geomoose-users] GeoMoose Mobile OpenLayers Control TouchNavigation

Reynolds, Michael J. (DOT) mike.reynolds at state.mn.us
Tue Jun 28 16:00:02 EDT 2011


I was wondering if anyone has created a good Mobile Touch version of Geomoose.  Is there a good way to do this?

I took a quick chop at it.  With a version of Goemoose 2.2. Downloaded the newest OpenLayers 2.11-rc1 to the htdocs folder.

Modified the index.html to load the openlayers.js from this new version's folder.

In the compiled.js file I made the following change:

function configureMap () {
      CONFIGURATION.scales = CONFIGURATION.scales.sort().reverse();

      var options = {
            maxExtent : OpenLayers.Bounds.fromArray(CONFIGURATION.max_extent),
            controls : [new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.ScaleJumper({target: 'scale-jumper'}), new OpenLayers.Control.TouchNavigation({dragPanOptions: {enableKinetic: true }})],
            units: CONFIGURATION.ground_units,
            projection: new OpenLayers.Projection(CONFIGURATION.projection),
            displayProjection: new OpenLayers.Projection(CONFIGURATION.projection),
            fractionalZoom: CONFIGURATION.fractional_zoom
      }

Specifically I added ", new OpenLayers.Control.TouchNavigation({dragPanOptions: {enableKinetic: true }})" to the controls array.

The site seemed to load up just fine.

The map panel now responds to touch gestures:

Double tap / reverse pinch = zoom in
Pinch = zoom out
Point drag = pan
Zoom to extent tool works.

Some of the navigation tools are not necessary now (magnifying glass, pan?)

The Identify tool does not work.  I think the way I added in the Touch Navigation or the existing geomoose tool management doesn't allow the identify click to override the touch navigation on the map div.

Our goal is to make our Geomoose site compatible with Ipad/Safari devices and Android devices.

I don't know what this breaks.  Does it break anything?

Anyone already pave this ground?


Michael Reynolds
(651) 775-5915
Traffic Engineering - Data Management
MnDot - Metro District
USNG: 15TVK8708484276

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20110628/412c7678/attachment.html


More information about the Geomoose-users mailing list