Hello Miguel,

I've combined the conversion of several classes into one patch because of
the overlap.

 - PolylineOptions
 - PolygonOptions
 - Fixed constructor name in PolyStyleOptions.java
 - Fixed references to above.
 - Changed some references to PolylineOptions to EncodedPolyline... that was
weird!

M      maps/maps/test/com/google/gwt/maps/client/overlay/PolygonTest.java
M      maps/maps/src/com/google/gwt/maps/client/overlay/PolygonOptions.java
A      maps/maps/src/com/google/gwt/maps/client/overlay/PolylineOptions.java
M      maps/maps/src/com/google/gwt/maps/client/overlay/EncodedPolyline.java
M
maps/maps/src/com/google/gwt/maps/client/overlay/PolyStyleOptions.java
M      maps/maps/src/com/google/gwt/maps/client/overlay/Polygon.java
M      maps/maps/src/com/google/gwt/maps/client/overlay/Polyline.java
D
maps/maps/src/com/google/gwt/maps/client/impl/PolyStyleOptionsImpl.java
M
maps/maps/src/com/google/gwt/maps/client/impl/PolylineFactoryImpl.java
D      maps/maps/src/com/google/gwt/maps/client/impl/PolygonOptionsImpl.java
D
maps/maps/src/com/google/gwt/maps/client/impl/PolylineOptionsImpl.java
M
maps/samples/hellomaps/src/com/google/gwt/maps/sample/hellomaps/client/DrawingOverlayDemo.java
M
maps/samples/hellomaps/src/com/google/gwt/maps/sample/hellomaps/client/OverlayDemo.java


-- 
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

M      maps/maps/test/com/google/gwt/maps/client/overlay/PolygonTest.java
M      maps/maps/src/com/google/gwt/maps/client/overlay/PolygonOptions.java
A      maps/maps/src/com/google/gwt/maps/client/overlay/PolylineOptions.java
M      maps/maps/src/com/google/gwt/maps/client/overlay/EncodedPolyline.java
M      maps/maps/src/com/google/gwt/maps/client/overlay/PolyStyleOptions.java
M      maps/maps/src/com/google/gwt/maps/client/overlay/Polygon.java
M      maps/maps/src/com/google/gwt/maps/client/overlay/Polyline.java
D      maps/maps/src/com/google/gwt/maps/client/impl/PolyStyleOptionsImpl.java
M      maps/maps/src/com/google/gwt/maps/client/impl/PolylineFactoryImpl.java
D      maps/maps/src/com/google/gwt/maps/client/impl/PolygonOptionsImpl.java
D      maps/maps/src/com/google/gwt/maps/client/impl/PolylineOptionsImpl.java
M      maps/samples/hellomaps/src/com/google/gwt/maps/sample/hellomaps/client/DrawingOverlayDemo.java
M      maps/samples/hellomaps/src/com/google/gwt/maps/sample/hellomaps/client/OverlayDemo.java

Index: maps/maps/test/com/google/gwt/maps/client/overlay/PolygonTest.java
===================================================================
--- maps/maps/test/com/google/gwt/maps/client/overlay/PolygonTest.java	(revision 766)
+++ maps/maps/test/com/google/gwt/maps/client/overlay/PolygonTest.java	(working copy)
@@ -161,7 +161,7 @@
     new LatLng(45, 45), //
         new LatLng(45, -45), //
         new LatLng(0, 0)};
-    PolygonOptions opts = new PolygonOptions();
+    PolygonOptions opts = PolygonOptions.newInstance();
     opts.setClickable(false);
     Polygon p = new Polygon(points, "#ff0000", 3, 1.0, "#0000ff", 0.3, opts);
     map.addOverlay(p);
Index: maps/maps/src/com/google/gwt/maps/client/overlay/PolygonOptions.java
===================================================================
--- maps/maps/src/com/google/gwt/maps/client/overlay/PolygonOptions.java	(revision 766)
+++ maps/maps/src/com/google/gwt/maps/client/overlay/PolygonOptions.java	(working copy)
@@ -16,19 +16,20 @@
 package com.google.gwt.maps.client.overlay;
 
 import com.google.gwt.core.client.JavaScriptObject;
-import com.google.gwt.maps.client.impl.PolygonOptionsImpl;
 
 /**
  * Options to pass to the [EMAIL PROTECTED] Polygon} constructor.
  */
-public class PolygonOptions {
+public class PolygonOptions extends JavaScriptObject {
 
-  private final JavaScriptObject jsoPeer;
-  
-  public PolygonOptions() {
-    jsoPeer = PolygonOptionsImpl.impl.construct();
+  public static PolygonOptions newInstance() {
+        return (PolygonOptions) createObject();
   }
   
+  protected PolygonOptions() {
+    // Protected constructor required for JS overlays.
+  } 
+  
   /**
    * Toggles whether or not the polygon is clickable. The default value for this
    * option is true, i.e. if the option is not specified, the polygon will be
@@ -36,7 +37,7 @@
    * 
    * @param clickable pass <code>false</code> to make this polygon not clickable.
    */
-  public void setClickable(boolean clickable) {
-    PolygonOptionsImpl.impl.setClickable(jsoPeer, clickable);
-  }
+  public final native void setClickable(boolean clickable) /*-{
+    this.clickable = clickable;
+  }-*/;
 }
Index: maps/maps/src/com/google/gwt/maps/client/overlay/PolylineOptions.java
===================================================================
--- maps/maps/src/com/google/gwt/maps/client/overlay/PolylineOptions.java	(revision 0)
+++ maps/maps/src/com/google/gwt/maps/client/overlay/PolylineOptions.java	(revision 0)
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2008 Google Inc.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.google.gwt.maps.client.overlay;
+
+import com.google.gwt.core.client.JavaScriptObject;
+
+/**
+ * Options to pass to the [EMAIL PROTECTED] Polygon} constructor.
+ */
+public class PolylineOptions extends JavaScriptObject {
+
+  public static PolylineOptions newInstance() {
+    return (PolylineOptions) createObject();
+  }
+
+  protected PolylineOptions() {
+    // Protected constructor required for JS overlays.
+  }
+
+  /**
+   * Toggles whether or not the polygon is clickable. The default value for this
+   * option is true, i.e. if the option is not specified, the polygon will be
+   * clickable.
+   * 
+   * @param clickable pass <code>false</code> to make this polygon not
+   *          clickable.
+   */
+  public final native void setClickable(boolean clickable) /*-{
+    this.clickable = clickable;
+  }-*/;
+
+  /**
+   * Render each edge of the polyline as a geodesic (a segment of a
+   * "great circle"). A geodesic is the shortest path between two points along
+   * the surface of the Earth.
+   * 
+   * @param geodesic <code>true</code> to set this polyline to be geodesic.
+   */
+  public final native void setGeodesic(boolean geodesic) /*-{
+    this.geodesic = geodesic;
+  }-*/;
+}

Property changes on: maps/maps/src/com/google/gwt/maps/client/overlay/PolylineOptions.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Date Author Id Revision HeadURL
Name: svn:eol-style
   + native

Index: maps/maps/src/com/google/gwt/maps/client/overlay/EncodedPolyline.java
===================================================================
--- maps/maps/src/com/google/gwt/maps/client/overlay/EncodedPolyline.java	(revision 766)
+++ maps/maps/src/com/google/gwt/maps/client/overlay/EncodedPolyline.java	(working copy)
@@ -30,6 +30,16 @@
    * <a href="http://code.google.com/apis/maps/documentation/overlays.html#Polylines_Overview";>Encoded Polylines Documentation</a>
    * for more details.
    * 
+   */
+  public static EncodedPolyline newInstance() {
+    return (EncodedPolyline) JavaScriptObject.createObject();
+  }
+  
+  /**
+   * Create a new encoded polyline. See
+   * <a href="http://code.google.com/apis/maps/documentation/overlays.html#Polylines_Overview";>Encoded Polylines Documentation</a>
+   * for more details.
+   * 
    * @param points a string containing the encoded latitude and longitude
    *          coordinates.
    * @param zoomFactor the magnification between adjacent sets of zoom levels in
@@ -39,7 +49,7 @@
    *          passed to [EMAIL PROTECTED] #setLevels(String)}.
    * @return a new encoded polyline object.
    */
-  public static EncodedPolyline createEncodedPolyline(String points,
+  public static EncodedPolyline newInstance(String points,
       int zoomFactor, String levels, int numLevels) {
     EncodedPolyline enc = (EncodedPolyline) JavaScriptObject.createObject();
     enc.setPoints(points);
@@ -69,10 +79,10 @@
    * @param opacity a number between 0 and 1.0 where 1.0 is totally opaque.
    * @return a new encoded polyline object.
    */
-  public static EncodedPolyline createEncodedPolyline(String points,
+  public static EncodedPolyline newInstance(String points,
       int zoomFactor, String levels, int numLevels, String color, int weight,
       double opacity) {
-    EncodedPolyline enc = createEncodedPolyline(points, zoomFactor, levels,
+    EncodedPolyline enc = newInstance(points, zoomFactor, levels,
         numLevels);
     enc.setColor(color);
     enc.setWeight(weight);
Index: maps/maps/src/com/google/gwt/maps/client/overlay/PolyStyleOptions.java
===================================================================
--- maps/maps/src/com/google/gwt/maps/client/overlay/PolyStyleOptions.java	(revision 766)
+++ maps/maps/src/com/google/gwt/maps/client/overlay/PolyStyleOptions.java	(working copy)
@@ -16,44 +16,40 @@
 package com.google.gwt.maps.client.overlay;
 
 import com.google.gwt.core.client.JavaScriptObject;
-import com.google.gwt.maps.client.impl.PolyStyleOptionsImpl;
 
 /**
  * Options to pass to the [EMAIL PROTECTED] Polyline} drawing routines.
  */
-public class PolyStyleOptions {
+public class PolyStyleOptions extends JavaScriptObject {
 
-  private final JavaScriptObject jsoPeer;
-
   /**
-   * Create an empty PolyStyleOptions object. Used as a parameter to the
-   * [EMAIL PROTECTED] Polyline} constructor.
+   * Creates a new PolyStyleOptions object. 
    */
-  public PolyStyleOptions() {
-    jsoPeer = PolyStyleOptionsImpl.impl.construct();
+  public static PolyStyleOptions getInstance() {
+    return (PolyStyleOptions) PolyStyleOptions.createObject();
   }
-
+  
   /**
-   * Create a PolyStyleOptions object. Used as a parameter to the
-   * [EMAIL PROTECTED] Polyline} constructor.
+   * Create a new PolyStyleOptions object. 
    * 
    * @param weightInPixels the width of the line to create.
    */
-  public PolyStyleOptions(int weightInPixels) {
-    this();
-    setWeight(weightInPixels);
+  public static PolyStyleOptions getInstance(int weightInPixels) {
+    PolyStyleOptions instance = getInstance();
+    instance.setWeight(weightInPixels);
+    return instance;
   }
 
   /**
-   * Create a PolyStyleOptions object. Used as a parameter to the
-   * [EMAIL PROTECTED] Polyline} constructor.
+   * Create a new PolyStyleOptions object. 
    * 
    * @param colorSpec color of the line. See [EMAIL PROTECTED] #setColor(String)} for the
    *          format of the string.
    */
-  public PolyStyleOptions(String colorSpec) {
-    this();
-    setColor(colorSpec);
+  public static PolyStyleOptions newInstance(String colorSpec) {
+    PolyStyleOptions instance = getInstance();
+    instance.setColor(colorSpec);
+    return instance;
   }
 
   /**
@@ -64,22 +60,27 @@
    * @param colorSpec color of the line. See [EMAIL PROTECTED] #setColor(String)} for the
    *          format of the string.
    */
-  public PolyStyleOptions(String colorSpec, int weightInPixels, double opacity) {
-    this();
-    setColor(colorSpec);
-    setWeight(weightInPixels);
-    setOpacity(opacity);
+  public static PolyStyleOptions newInstance(String colorSpec, int weightInPixels, double opacity) {
+    PolyStyleOptions instance = getInstance();
+    instance.setColor(colorSpec);
+    instance.setWeight(weightInPixels);
+    instance.setOpacity(opacity);
+    return instance;
   }
 
+  protected PolyStyleOptions() {
+    // Required for a JS overlay.
+  }
+
   /**
    * Specifies a string that contains a hexadecimal numeric HTML style, i.e.
    * #RRGGBB.
    * 
    * @param colorSpec specifies a color in hex format.
    */
-  void setColor(String colorSpec) {
-    PolyStyleOptionsImpl.impl.setColor(jsoPeer, colorSpec);
-  }
+  public final native void setColor(String colorSpec) /*-{
+    this.color = colorSpec;
+  }-*/;
 
   /**
    * Specifies the opacity of the polyline.
@@ -87,17 +88,17 @@
    * @param opacity specifies the opacity of the polyline as a fractional value
    *          between 0 (transparent) and 1 (opaque).
    */
-  void setOpacity(double opacity) {
-    PolyStyleOptionsImpl.impl.setOpacity(jsoPeer, opacity);
-  }
+  public final native void setOpacity(double opacity) /*-{
+    this.opacity = opacity;
+  }-*/;
 
   /**
    * Specifies the width of the line in pixels.
    * 
    * @param weightInPixels specifies the width of the line in pixels.
    */
-  void setWeight(int weightInPixels) {
-    PolyStyleOptionsImpl.impl.setWeight(jsoPeer, weightInPixels);
-  }
+  public final native void setWeight(int weightInPixels) /*-{
+    this.weight = weightInPixels;
+  }-*/;
 
 }
Index: maps/maps/src/com/google/gwt/maps/client/overlay/Polygon.java
===================================================================
--- maps/maps/src/com/google/gwt/maps/client/overlay/Polygon.java	(revision 766)
+++ maps/maps/src/com/google/gwt/maps/client/overlay/Polygon.java	(working copy)
@@ -115,6 +115,7 @@
     return new $wnd.GPolygon.fromEncoded({polylines: polylinesIn, fill: fillIn, color: colorIn, opacity: opacityIn, outline: outlineIn});
   }-*/;
 
+  @SuppressWarnings("unchecked")
   private static JsArray<EncodedPolyline> toJsArray(EncodedPolyline[] array) {
     if (GWT.isScript()) {
       // This is the most efficient thing to do, and works in web mode
Index: maps/maps/src/com/google/gwt/maps/client/overlay/Polyline.java
===================================================================
--- maps/maps/src/com/google/gwt/maps/client/overlay/Polyline.java	(revision 766)
+++ maps/maps/src/com/google/gwt/maps/client/overlay/Polyline.java	(working copy)
@@ -35,7 +35,6 @@
 import com.google.gwt.maps.client.impl.MapEvent;
 import com.google.gwt.maps.client.impl.PolylineFactoryImpl;
 import com.google.gwt.maps.client.impl.PolylineImpl;
-import com.google.gwt.maps.client.impl.PolylineOptionsImpl;
 import com.google.gwt.maps.client.impl.EventImpl.BooleanCallback;
 import com.google.gwt.maps.client.impl.EventImpl.LatLngCallback;
 import com.google.gwt.maps.client.impl.EventImpl.VoidCallback;
@@ -54,25 +53,25 @@
 
   public static Polyline fromEncoded(String color, int weight, double opacity,
       String encodedPoints, int zoomFactor, String encodedLevels, int numLevels) {
-    JavaScriptObject optionsJso = PolylineOptionsImpl.impl.construct();
-    PolylineOptionsImpl.impl.setColor(optionsJso, color);
-    PolylineOptionsImpl.impl.setWeight(optionsJso, weight);
-    PolylineOptionsImpl.impl.setOpacity(optionsJso, opacity);
-    PolylineOptionsImpl.impl.setPoints(optionsJso, encodedPoints);
-    PolylineOptionsImpl.impl.setZoomFactor(optionsJso, zoomFactor);
-    PolylineOptionsImpl.impl.setLevels(optionsJso, encodedLevels);
-    PolylineOptionsImpl.impl.setNumLevels(optionsJso, numLevels);
-    return new Polyline(PolylineFactoryImpl.impl.fromEncoded(optionsJso));
+    EncodedPolyline encoded = EncodedPolyline.newInstance();
+    encoded.setColor(color);
+    encoded.setWeight(weight);
+    encoded.setOpacity(opacity);
+    encoded.setPoints(encodedPoints);
+    encoded.setZoomFactor(zoomFactor);
+    encoded.setLevels(encodedLevels);
+    encoded.setNumLevels(numLevels);
+    return new Polyline(PolylineFactoryImpl.impl.fromEncoded(encoded));
   }
 
   public static Polyline fromEncoded(String encodedPoints, int zoomFactor,
       String encodedLevels, int numLevels) {
-    JavaScriptObject optionsJso = PolylineOptionsImpl.impl.construct();
-    PolylineOptionsImpl.impl.setPoints(optionsJso, encodedPoints);
-    PolylineOptionsImpl.impl.setZoomFactor(optionsJso, zoomFactor);
-    PolylineOptionsImpl.impl.setLevels(optionsJso, encodedLevels);
-    PolylineOptionsImpl.impl.setNumLevels(optionsJso, numLevels);
-    return new Polyline(PolylineFactoryImpl.impl.fromEncoded(optionsJso));
+    EncodedPolyline encoded = EncodedPolyline.newInstance();
+    encoded.setPoints(encodedPoints);
+    encoded.setZoomFactor(zoomFactor);
+    encoded.setLevels(encodedLevels);
+    encoded.setNumLevels(numLevels);
+    return new Polyline(PolylineFactoryImpl.impl.fromEncoded(encoded));
   }
 
   /**
Index: maps/maps/src/com/google/gwt/maps/client/impl/PolyStyleOptionsImpl.java
===================================================================
--- maps/maps/src/com/google/gwt/maps/client/impl/PolyStyleOptionsImpl.java	(revision 766)
+++ maps/maps/src/com/google/gwt/maps/client/impl/PolyStyleOptionsImpl.java	(working copy)
@@ -1,41 +0,0 @@
-/*
- * Copyright 2008 Google Inc.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.maps.client.impl;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.core.client.JavaScriptObject;
-import com.google.gwt.maps.jsio.client.BeanProperties;
-import com.google.gwt.maps.jsio.client.Constructor;
-import com.google.gwt.maps.jsio.client.JSFlyweightWrapper;
-
-/**
- * Wrapper for the GPolyStyleOptions object from the Maps API using JSIO. The Maps
- * API does not provide a constructor for this object. Instead, it is
- * constructed from a JavaScript Object literal.
- */
[EMAIL PROTECTED]
-public interface PolyStyleOptionsImpl extends JSFlyweightWrapper {
-  PolyStyleOptionsImpl impl = GWT.create(PolyStyleOptionsImpl.class);
-
-  @Constructor("Object")
-  JavaScriptObject construct();
-
-  void setColor(JavaScriptObject jsoPeer, String colorSpec);
-
-  void setOpacity(JavaScriptObject jsoPeer, double opacity);
-
-  void setWeight(JavaScriptObject jsoPeer, int weightInPixels);
-}
Index: maps/maps/src/com/google/gwt/maps/client/impl/PolylineFactoryImpl.java
===================================================================
--- maps/maps/src/com/google/gwt/maps/client/impl/PolylineFactoryImpl.java	(revision 766)
+++ maps/maps/src/com/google/gwt/maps/client/impl/PolylineFactoryImpl.java	(working copy)
@@ -17,6 +17,7 @@
 
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.maps.client.overlay.EncodedPolyline;
 import com.google.gwt.maps.jsio.client.Global;
 import com.google.gwt.maps.jsio.client.JSWrapper;
 
@@ -27,5 +28,5 @@
 public interface PolylineFactoryImpl extends JSWrapper<PolylineFactoryImpl> {
   PolylineFactoryImpl impl = GWT.create(PolylineFactoryImpl.class);
 
-  JavaScriptObject fromEncoded(JavaScriptObject polylineOptions);
+  JavaScriptObject fromEncoded(EncodedPolyline polylineOptions);
 }
Index: maps/maps/src/com/google/gwt/maps/client/impl/PolygonOptionsImpl.java
===================================================================
--- maps/maps/src/com/google/gwt/maps/client/impl/PolygonOptionsImpl.java	(revision 766)
+++ maps/maps/src/com/google/gwt/maps/client/impl/PolygonOptionsImpl.java	(working copy)
@@ -1,42 +0,0 @@
-/*
- * Copyright 2008 Google Inc.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.maps.client.impl;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.core.client.JavaScriptObject;
-import com.google.gwt.maps.jsio.client.BeanProperties;
-import com.google.gwt.maps.jsio.client.Constructor;
-import com.google.gwt.maps.jsio.client.JSFlyweightWrapper;
-
-/**
- * Wraps the GPolygonOptions class from the Maps API using JSIO. The Maps API
- * does not provide a constructor for this object. Instead, the object is
- * constructed from a JavaScript Object literal.
- */
[EMAIL PROTECTED]
-public abstract class PolygonOptionsImpl implements JSFlyweightWrapper {
-  public static final PolygonOptionsImpl impl = GWT.create(PolygonOptionsImpl.class);
-
-  /**
-   * The Maps API does not provide a GPolylineOptions constructor. It advises to
-   * use Object instead.
-   */
-  @Constructor("Object")
-  public abstract JavaScriptObject construct();
-
-  public abstract void setClickable(JavaScriptObject jsoPeer, boolean clickable);
-
-}
\ No newline at end of file
Index: maps/maps/src/com/google/gwt/maps/client/impl/PolylineOptionsImpl.java
===================================================================
--- maps/maps/src/com/google/gwt/maps/client/impl/PolylineOptionsImpl.java	(revision 766)
+++ maps/maps/src/com/google/gwt/maps/client/impl/PolylineOptionsImpl.java	(working copy)
@@ -1,53 +0,0 @@
-/*
- * Copyright 2008 Google Inc.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.gwt.maps.client.impl;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.core.client.JavaScriptObject;
-import com.google.gwt.maps.jsio.client.BeanProperties;
-import com.google.gwt.maps.jsio.client.Constructor;
-import com.google.gwt.maps.jsio.client.JSFlyweightWrapper;
-
-/**
- * Wraps the GPolylineOptions class from the Maps API using JSIO. The Maps API
- * does not provide a constructor for this object. Instead, the object is
- * constructed from a JavaScript Object literal.
- */
[EMAIL PROTECTED]
-public abstract class PolylineOptionsImpl implements JSFlyweightWrapper {
-  public static final PolylineOptionsImpl impl = GWT.create(PolylineOptionsImpl.class);
-
-  /**
-   * The Maps API does not provide a GPolylineOptions constructor. It advises to
-   * use Object instead.
-   */
-  @Constructor("Object")
-  public abstract JavaScriptObject construct();
-
-  public abstract void setColor(JavaScriptObject jsoPeer, String color);
-
-  public abstract void setLevels(JavaScriptObject jsoPeer, String encodedLevels);
-
-  public abstract void setNumLevels(JavaScriptObject jsoPeer, int numLevels);
-
-  public abstract void setOpacity(JavaScriptObject jsoPeer, double opacity);
-
-  public abstract void setPoints(JavaScriptObject jsoPeer, String encodedPoints);
-
-  public abstract void setWeight(JavaScriptObject jsoPeer, int weight);
-
-  public abstract void setZoomFactor(JavaScriptObject jsoPeer, int zoomFactor);
-}
\ No newline at end of file
Index: maps/samples/hellomaps/src/com/google/gwt/maps/sample/hellomaps/client/DrawingOverlayDemo.java
===================================================================
--- maps/samples/hellomaps/src/com/google/gwt/maps/sample/hellomaps/client/DrawingOverlayDemo.java	(revision 766)
+++ maps/samples/hellomaps/src/com/google/gwt/maps/sample/hellomaps/client/DrawingOverlayDemo.java	(working copy)
@@ -104,7 +104,7 @@
   }
 
   private void createPolyline() {
-    PolyStyleOptions style = new PolyStyleOptions(color, weight, opacity);
+    PolyStyleOptions style = PolyStyleOptions.newInstance(color, weight, opacity);
 
     final Polyline poly = new Polyline(new LatLng[0]);
     lastPolyline = poly;
@@ -138,7 +138,7 @@
   }
 
   private void createPolygon() {
-    PolyStyleOptions style = new PolyStyleOptions(color, weight, opacity);
+    PolyStyleOptions style = PolyStyleOptions.newInstance(color, weight, opacity);
 
     final Polygon poly = new Polygon(new LatLng[0], color, weight, opacity,
         color, fillFlag ? .7 : 0.0);
Index: maps/samples/hellomaps/src/com/google/gwt/maps/sample/hellomaps/client/OverlayDemo.java
===================================================================
--- maps/samples/hellomaps/src/com/google/gwt/maps/sample/hellomaps/client/OverlayDemo.java	(revision 766)
+++ maps/samples/hellomaps/src/com/google/gwt/maps/sample/hellomaps/client/OverlayDemo.java	(working copy)
@@ -216,10 +216,10 @@
         // Add a polygon encoded as a series of polylines.
         map.setCenter(new LatLng(33.75951619957536, -84.39289301633835), 20);
         EncodedPolyline[] polylines = new EncodedPolyline[2];
-        polylines[0] = EncodedPolyline.createEncodedPolyline(
+        polylines[0] = EncodedPolyline.newInstance(
             "[EMAIL PROTECTED]", 2, "BBBBB", 1, "#ff0000", 2, 0.9);
 
-        polylines[1] = EncodedPolyline.createEncodedPolyline(
+        polylines[1] = EncodedPolyline.newInstance(
             "[EMAIL PROTECTED]@?", 2, "BBBBB", 1);
         polylines[1].setColor("#ff0000");
         polylines[1].setWeight(2);

Reply via email to