<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: Nickh's Code Snippets</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Thu, 24 Jul 2008 18:14:55 GMT</pubDate>
    <description>DZone Snippets: Nickh's Code Snippets</description>
    <item>
      <title>Draggable eInsert</title>
      <link>http://snippets.dzone.com/posts/show/2463</link>
      <description>// description of your code here&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;br /&gt;    //&lt;![CDATA[&lt;br /&gt;    &lt;br /&gt;    if (GBrowserIsCompatible()) { &lt;br /&gt;&lt;br /&gt;      var map = new GMap2(document.getElementById("map"));&lt;br /&gt;      map.addControl(new GLargeMapControl());&lt;br /&gt;      map.addControl(new GMapTypeControl());&lt;br /&gt;      map.setCenter(new GLatLng(53.849, -3.022),16);&lt;br /&gt;&lt;br /&gt;      // Optionally set the cursors to be used for dragging&lt;br /&gt;      GDraggableObject.setDraggableCursor("move");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;      // Insert the "Nosuch Road" road &lt;br /&gt;      var insert1 = new EInsert(new GLatLng(53.85022, -3.01772), "nosuch.png", new GSize(145,233), 16);&lt;br /&gt;      map.addOverlay(insert1);&lt;br /&gt;      // Make it draggable&lt;br /&gt;      insert1.makeDraggable();&lt;br /&gt;      &lt;br /&gt;      // A new event that returns the new latlng when the drag ends&lt;br /&gt;      GEvent.addListener(insert1, "dragend", function (pt) {&lt;br /&gt;        GLog.write("New position of insert = "+ pt.lat() + ","+pt.lng());&lt;br /&gt;      });&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    //]]&gt;&lt;br /&gt;    &lt;/script&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Thu, 24 Aug 2006 06:34:07 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/2463</guid>
      <author>NickH (Nicolas Haase)</author>
    </item>
  </channel>
</rss>
