Integrate Google Maps and Appian on 7.10

I have a requirement where I need to integrate Google Maps with Appian. For example origin is A and destination is B and i click on submit, i should get the possible routes as radio buttons and when i select one of them it should display the route. This application is on 7.10

OriginalPostID-185711

OriginalPostID-185711

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to Sudipta Biswas

    Hi,

    Once you get the API Key, you can use the following code to display a particular location on google map in a SAIL Interface based on the provided latitude and longitude by the user. This will only work for static maps.
    a!formLayout(
    label: "",
    instructions: "Enter Latitude and Longitude to locate on map",
    contents: {
    a!columnsLayout(
    columns: {
    a!columnLayout(
    contents: {
    a!floatingPointField(
    label: "Latitude",
    value: ri!latitude,
    saveInto: ri!latitude
    ),
    a!floatingPointField(
    label: "Longitude",
    value: ri!longitude,
    saveInto: ri!longitude
    ),
    a!imageField_17r3(
    images: {
    a!webImage(
    source: concat(
    "https://maps.googleapis.com/maps/api/staticmap?center=" & ri!latitude & "," & ri!longitude & "&zoom=11&size=8000x8000&markers=color:red%7Clabel:%7C" & ri!latitude & "," & ri!longitude & "&key=Your API Key"
    )
    )
    }
    )
    }
    )
    }
    )
    }
    )

Children