How can I change the coordinates for the iframe google map to print different results depending on the coordinates passed

I have managed to create a page where a user can click and change access the google maps using the following code.

<tr>
    <td>Coordinates:</td>
    <td>
        <a href="http://maps.google.com/?q=MY%20LOCATION@{{place.place.lat}},{{place.place.lng}}">{{place.place.lat}},{{place.place.lng}}</a>
    </td>
    <br />
</tr>

Also, this is an angularjs app. Now I want to embed this map on my application with the same concept of changing the latitude and longitude when the user clicks on different places to show where that particular place. How can I do this? I have looked into iframe, but I can only use the fixed coordinates.

Upvotes: 0

Views: 1728

Answers (1)

Roxci William
Roxci William

Reputation: 85

Bind an object with coordinates property on your controller to the google-map center directive property and update the property if somebody commits a search.

Upvotes: 1

Related Questions