001 package com.google.gwt.maps.client.geometrylib;
002
003 import com.google.gwt.core.client.JsArray;
004 import com.google.gwt.maps.client.base.LatLng;
005 import com.google.gwt.maps.client.mvc.MVCArray;
006
007 public class EncodingUtils {
008
009 /**
010 * Decodes an encoded path string into a sequence of LatLngs.
011 * @param encodedPath
012 */
013 public final static native JsArray<LatLng> decodePath(String encodedPath) /*-{
014 return $wnd.google.maps.geometry.encoding.decodePath(encodedPath);
015 }-*/;
016
017 /**
018 * Encodes a sequence of LatLngs into an encoded path string.
019 * @param path
020 */
021 public final static native String encodePath(JsArray<LatLng> path) /*-{
022 return $wnd.google.maps.geometry.encoding.encodePath(path);
023 }-*/;
024
025 /**
026 * Encodes a sequence of LatLngs into an encoded path string.
027 * @param path
028 */
029 public final static native String encodePath(MVCArray<LatLng> path) /*-{
030 return $wnd.google.maps.geometry.encoding.encodePath(path);
031 }-*/;
032
033 }