angular-google-maps icon indicating copy to clipboard operation
angular-google-maps copied to clipboard

Window not showing in correct place

Open Karttin opened this issue 12 years ago • 3 comments

Hello,

I am trying to plot a list of co-ordinates on a map and while clicking on each marker I need show a simple window with some details.

Markers seems to plot correctly, but i couldnt get the window to show at correct place. Any marker i click - window seems to show for the first marker.

Here is a plunker to show...

http://plnkr.co/edit/anokzj0RHtlZbSi6s7MX?p=preview

Any help appreciated.

Karttin avatar Oct 01 '14 20:10 Karttin

I had similar issue yesterday. See my plunkr which I used to highlight a separate issue with Angular versioning yesterday. http://plnkr.co/edit/sN1o4mNn1tiyifPJglQz

This example shows the window opening in the correct pos using the marker lat/lon.

I think your issue would be resolved moving your code which generates the marker (or at least attaches functions to it) inside it's own function, then call this inside your loop - I'd avoid pushing things into an array directly on scope too. Create local var and stuff it in scope when you're done manipulating.

sicollins avatar Oct 02 '14 09:10 sicollins

@Karttin Your original plunkr appears to be working fine to me. What is the issue?

nmccready avatar Oct 05 '14 15:10 nmccready

closing

nmccready avatar Oct 05 '14 15:10 nmccready