1

I need a marker ui-gmap-windows click event to pass in the marker id when it's clicked on. I'm sure there's a way to do it, I just can't figure it out.

Here's the HTML:

<ui-gmap-google-map center='map.center' zoom='map.zoom' id='map-canvas' options="options">
    <ui-gmap-markers models="markers" options="'options'" coords="'coords'" idKey="'id'">
        <ui-gmap-windows show="'show'" closeClick="'closeClick'">
            <div ng-controller="updateResortController" ng-click="markerClick(id)">
                <span ng-non-bindable id="{{id}}">{{title}} : {{id}}</span>
            </div>
        </ui-gmap-windows>
    </ui-gmap-markers>
</ui-gmap-google-map>

You can see the controller registered to the window. The click event works, The function runs, but 'id' is undefined.

I'm trying to keep it simple but let me know if you need to see the script. Thanks!

1 Answer 1

1

Well I guess I just needed a night to think it over. For those of you who're interested, I used: $parent.model.id (id is specific to my application). So:

ng-click="markerClick($parent.model.id)"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.