Google Maps Place Services

时间:2018-05-06 17:07:18

标签: google-maps

How can I replace the lat + lng in this string with a variable from my code?

<table>

I'm trying to make nearby parking lots show up, but having no luck at all with making it work. Ironically, it did show them until I started editing the code to add my own custom markers. Any help would be appreciated.

I should note that I'm using geolocation which sets the lat lng as the following:

/**
 * Calculates the TOTAL price of the order.
 */
private int calculatePrice(int qty) {
    int totalPrice = quantity * qty;
    return totalPrice;
}

// You are calling by passing the quantity (qty)
int qty = 5;
int invoicePrice = calculatePrice(qty);
    String priceMessage = createOrderSummary(inoicePrice, hasWhippedCream);

1 个答案:

答案 0 :(得分:0)

change location value in query string (API url)

String.Concat("hello", "; ", "world")

Now use this StringBuilder sb = new StringBuilder(); sb.Append("hello"); sb.Append("; "); sb.Append("world"); sb.ToString(); variable wherever you wants