List of usage examples for com.google.gwt.maps.client.visualizationlib WeightedLocation newInstance
public static WeightedLocation newInstance(LatLng location, double weight)
From source file:com.google.gwt.maps.testing.client.maps.HeatMapLayerWidget.java
License:Apache License
/** * Get (randomly_ weighted spatial data for use in tests * // ww w . j av a2 s.c o m * @return */ @SuppressWarnings("unused") // here as an example of WeightedDataPoints private JsArray<WeightedLocation> getSampleWeightedData() { JsArray<LatLng> samplePoints = getSampleData(); JsArray<WeightedLocation> sampleLocations = ArrayHelper.toJsArray(new WeightedLocation[] {}); for (int n = 0, len = samplePoints.length(); n < len; n++) { sampleLocations.push(WeightedLocation.newInstance(samplePoints.get(n), 10 * Math.random())); } return sampleLocations; }