... the user friendly GPS tool


Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Verschieben mehrerer Punkte
#9
(31.12.2011, 12:10)lundefugl Wrote: Hallo Christian,

evtl. hätte ich auch hier einen Lösungsansatz. Bei Mousmove erhält man den Status von Ctrl, Alt und Shift mit.
Da beim Verschieben von Markern wohl meist die Maus bewegt wird, könnte man sich den Status einfach vorher merken.

Eine bisher nicht verwendete Kombination (z.B. Alt+Ctrl ??) müsste sich doch für den Multi-Move finden lassen - oder ?

Natürlich weiss ich nicht, was die ganzen Browser dazu sagen, da ich den Code aus dem Internet habe. Dort war von Firefox und dem IE die Rede. Chrome, Safari, Opera usw. wäre wohl wieder erst zu testen...

Anbei mal ein Experimentalcode von mir, der auf alle 3 Tasten reagiert.

Gruß
Thomas

Die Ctrl Taste ist für Mac schon belegt.

Code:
/**

* @name KeyDragZoom for V3

* @version 2.0.5 [December 8, 2010]

* @author: Nianwei Liu [nianwei at gmail dot com] & Gary Little [gary at luxcentral dot com]

* @fileoverview This library adds a drag zoom capability to a V3 Google map.

*  When drag zoom is enabled, holding down a designated hot key <code>(shift | ctrl | alt)</code>

*  while dragging a box around an area of interest will zoom the map in to that area when

*  the mouse button is released. Optionally, a visual control can also be supplied for turning

*  a drag zoom operation on and off.

*  Only one line of code is needed: <code>google.maps.Map.enableKeyDragZoom();</code>

*  <p>

*  NOTE: Do not use Ctrl as the hot key with Google Maps JavaScript API V3 since, unlike with V2,

*  it causes a context menu to appear when running on the Macintosh.

*  <p>


Grüße,
Ilmari
Reply


Messages In This Thread
Verschieben mehrerer Punkte - by lundefugl - 28.09.2011, 05:08
RE: Verschieben mehrerer Punkte - by IlmariKrebs - 31.12.2011, 14:19

Forum Jump:


Users browsing this thread: 1 Guest(s)