public Marker greaterAdjacent() { if (!valueBlock.isPresent()) { throw new IllegalStateException("No marker adjacent to unbounded"); } switch (bound) { case BELOW: return new Marker(type, valueBlock, Bound.EXACTLY); case EXACTLY: return new Marker(type, valueBlock, Bound.ABOVE); case ABOVE: throw new IllegalStateException("No greater marker adjacent to an ABOVE bound"); default: throw new AssertionError("Unsupported type: " + bound); } }
public Marker lesserAdjacent() { if (!valueBlock.isPresent()) { throw new IllegalStateException("No marker adjacent to unbounded"); } switch (bound) { case BELOW: throw new IllegalStateException("No lesser marker adjacent to a BELOW bound"); case EXACTLY: return new Marker(type, valueBlock, Bound.BELOW); case ABOVE: return new Marker(type, valueBlock, Bound.EXACTLY); default: throw new AssertionError("Unsupported type: " + bound); } }
private static Marker create(Type type, Optional<Object> value, Bound bound) { return new Marker(type, value.map(object -> Utils.nativeValueToBlock(type, object)), bound); }
//this is generated dynamically from DB. var markers = [ {lat:115416,lng:26411}, {lat:115416,lng:26411} ]; //this is static, just grabs the dynamic bit and puts it on the map: for (var i = 0; i < markers.length; i++){ //creates a marker object var marker = new Marker({lat:markers[i].lat, lng:markers[i].lng }) //displays it on the map map.addMarker(marker); }
for (int i = 0; i < someSize; i++){ redMarker[i] = new Marker(); }
var markers = [new Marker(...), new Marker(...), ...]; markers[markerIndex].openPopup();
public Marker greaterAdjacent() { if (!valueBlock.isPresent()) { throw new IllegalStateException("No marker adjacent to unbounded"); } switch (bound) { case BELOW: return new Marker(type, valueBlock, Bound.EXACTLY); case EXACTLY: return new Marker(type, valueBlock, Bound.ABOVE); case ABOVE: throw new IllegalStateException("No greater marker adjacent to an ABOVE bound"); default: throw new AssertionError("Unsupported type: " + bound); } }
public Marker lesserAdjacent() { if (!valueBlock.isPresent()) { throw new IllegalStateException("No marker adjacent to unbounded"); } switch (bound) { case BELOW: throw new IllegalStateException("No lesser marker adjacent to a BELOW bound"); case EXACTLY: return new Marker(type, valueBlock, Bound.BELOW); case ABOVE: return new Marker(type, valueBlock, Bound.EXACTLY); default: throw new AssertionError("Unsupported type: " + bound); } }
Marker m = new Marker(new z() {
private static Marker create(Type type, Optional<Object> value, Bound bound) { return new Marker(type, value.map(object -> Utils.nativeValueToBlock(type, object)), bound); }
public class Helper { public String stringify(List<Marker> l) { String rs = ""; for (Marker marker : l) { rs = rs + ',' + marker.toString(); } rs.substring(1); return rs; } public List<Marker> makeList(String rs){ List<Marker> rl = new LinkedList<Marker>(); String[] a = rs.split(","); for (String string : a) { Marker rm = new Marker(); // I don't know what class of marker you use, //but here you should create the marker from the string rl.add(rm); } return rl; } }
public static class MarkerGSONDeserializer implements JsonDeserializer<Marker>{ @Override public Marker deserialize(JsonElement data, Type arg1, JsonDeserializationContext arg2) throws JsonParseException { if(!data.isJsonObject()){ return null; } else { JsonObject obj = data.getAsJsonObject(); Marker res = new Marker(); res.setId(obj.get("id").getAsInt()); res.setName(obj.get("name").getAsString()); res.setUserId(((obj.get("links").getAsJsonObject())).get("user").getAsJsonObject()).get("id").getAsInt(); return res; } } }
Gson gson = new Gson(); java.sql.Connection con = new DBConn().getConnection(); //establish the database connection you use String getquery = "SELECT * from markers"; ResultSet res = DBHandle.getData(con, getquery); ArrayList<Marker> markerList; markerList = new ArrayList<Marker>(); while (res.next()) { Marker marker=new Marker(); //model class with attributes latitude,longitude and name along with their getters and setters marker.setLatitude(res.getString("latitude")); marker.setLongitude(res.getString("longitude")); marker.setName(res.getString("name")); markerList.add(marker); } String JsonString = gson.toJson(markerList, ArrayList.class); out.print(JsonString);
Marker marker = new Marker(); marker.setEnabled(true); SeriesPlotOptions spo = new SeriesPlotOptions(); spo.setMarker(marker); Series series1 = chart.createSeries() .setPlotOptions(spo)
var marker = new Marker(); marker.XPos = mouseXPos - (marker.Width / 2); marker.YPos = mouseYPos - marker.Height;
var marker = new Marker(); marker.XPos = mouseXPos - (marker.Width / 2); marker.YPos = mouseYPos - marker.Height;
GMap.Width = 195; Marker loMarker = new Marker(); loMarker.Position.Latitude = Convert.ToDouble(loData.Latitude); loMarker.Position.Longitude = Convert.ToDouble(loData.Longitude);