/** * Enforce expectations about types of GeoJson objects for Turf. * * @param value any GeoJson object * @param type expected GeoJson type * @param name name of calling function * @see <a href="http://turfjs.org/docs/#geojsontype">Turf geojsonType documentation</a> * @since 1.2.0 */ public static void geojsonType(GeoJson value, String type, String name) { if (TextUtils.isEmpty(type) || TextUtils.isEmpty(name)) { throw new TurfException("Type and name required"); } if (value == null || !value.type().equals(type)) { throw new TurfException("Invalid input to " + name + ": must be a " + type + ", given " + (value != null ? value.type() : " null")); } }
annotations.add(String.format(Locale.US, "geojson(%s)", geoJson().toJson()));
annotations.add(String.format(Locale.US, "geojson(%s)", geoJson().toJson()));
annotations.add(String.format(Locale.US, "geojson(%s)", geoJson().toJson()));