@Test public void getLocationMapIsNotEmpty() { Position whiteHouse = Position.fromCoordinates(-77.0365, 38.8977); assertTrue(ImageComponent.getLocationMap(whiteHouse, true).startsWith(BASE_URL)); assertTrue(ImageComponent.getLocationMap(whiteHouse, false).startsWith(BASE_URL)); }
public static String getLocationMap(Position position, boolean isSmall) { StaticMarkerAnnotation marker = new StaticMarkerAnnotation.Builder() .setName(com.mapbox.services.Constants.PIN_LARGE) .setPosition(position) .setColor(COLOR_RED) .build(); MapboxStaticImage client = new MapboxStaticImage.Builder() .setAccessToken(Constants.MAPBOX_ACCESS_TOKEN) .setWidth(isSmall ? smallWidth : largeWidth) .setHeight(isSmall ? smallHeight : largeHeight) .setStyleId(com.mapbox.services.Constants.MAPBOX_STYLE_STREETS) .setPosition(position) .setStaticMarkerAnnotations(marker) .setZoom(15) .build(); return client.getUrl().toString(); }
ImageComponent { public static String getLocationMap(Position position, boolean isSmall) { StaticMarkerAnnotation marker = new StaticMarkerAnnotation.Builder() .setName(com.mapbox.services.Constants.PIN_LARGE) .setPosition(position) .setColor(COLOR_RED) .build(); MapboxStaticImage client = new MapboxStaticImage.Builder() .setAccessToken(Constants.MAPBOX_ACCESS_TOKEN) .setWidth(isSmall ? smallWidth : largeWidth) .setHeight(isSmall ? smallHeight : largeHeight) .setStyleId(com.mapbox.services.Constants.MAPBOX_STYLE_STREETS) .setPosition(position) .setStaticMarkerAnnotations(marker) .setZoom(15) .build(); return client.getUrl().toString(); } }
ImageComponent { public static String getLocationMap(Position position, boolean isSmall) { StaticMarkerAnnotation marker = new StaticMarkerAnnotation.Builder() .setName(com.mapbox.services.Constants.PIN_LARGE) .setPosition(position) .setColor(COLOR_RED) .build(); MapboxStaticImage client = new MapboxStaticImage.Builder() .setAccessToken(Constants.MAPBOX_ACCESS_TOKEN) .setWidth(isSmall ? smallWidth : largeWidth) .setHeight(isSmall ? smallHeight : largeHeight) .setStyleId(com.mapbox.services.Constants.MAPBOX_STYLE_STREETS) .setPosition(position) .setStaticMarkerAnnotations(marker) .setZoom(15) .build(); return client.getUrl().toString(); }  }
ImageComponent { public static String getLocationMap(Position position, boolean isSmall) { StaticMarkerAnnotation marker = new StaticMarkerAnnotation.Builder() .setName(com.mapbox.services.Constants.PIN_LARGE) .setPosition(position) .setColor(COLOR_RED) .build(); MapboxStaticImage client = new MapboxStaticImage.Builder() .setAccessToken(Constants.MAPBOX_ACCESS_TOKEN) .setWidth(isSmall ? smallWidth : largeWidth) .setHeight(isSmall ? smallHeight : largeHeight) .setStyleId(com.mapbox.services.Constants.MAPBOX_STYLE_STREETS) .setPosition(position) .setStaticMarkerAnnotations(marker) .setZoom(15) .build(); return client.getUrl().toString(); }  static String getWelcomeMap(boolean isSmall); static String getLocationMap(Position position, boolean isSmall); static String getRouteMap(Position origin, Position destination, String geometry, boolean isSmall); }
ImageComponent { public static String getLocationMap(Position position, boolean isSmall) { StaticMarkerAnnotation marker = new StaticMarkerAnnotation.Builder() .setName(com.mapbox.services.Constants.PIN_LARGE) .setPosition(position) .setColor(COLOR_RED) .build(); MapboxStaticImage client = new MapboxStaticImage.Builder() .setAccessToken(Constants.MAPBOX_ACCESS_TOKEN) .setWidth(isSmall ? smallWidth : largeWidth) .setHeight(isSmall ? smallHeight : largeHeight) .setStyleId(com.mapbox.services.Constants.MAPBOX_STYLE_STREETS) .setPosition(position) .setStaticMarkerAnnotations(marker) .setZoom(15) .build(); return client.getUrl().toString(); }  static String getWelcomeMap(boolean isSmall); static String getLocationMap(Position position, boolean isSmall); static String getRouteMap(Position origin, Position destination, String geometry, boolean isSmall);  }