Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9137523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:06:49+00:00 2026-06-17T09:06:49+00:00

I have a map with some markers on it. On click, each marker is

  • 0

I have a map with some markers on it. On click, each marker is opening a overlay-div.

 <div class="map" ng-init="loadall()">
            <a ng-click="details.show=!details.show" href="#/dealer/{{marker.id}}" class="marker" style="left:{{marker.coordleft}}px;top:{{marker.coordtop}}px" ng-repeat="marker in dealer"></a>    
        </div>  

it’s opening this div:

<div ng-show="details.show">      
    <div ng-view></div>
</div>  

Problem:
If the div is already open (details.show == true) my customer noticed, that if you leave it open and click on an other marker on the map, the div closes again.

What I want to achieve:
If the div is already open, just load the new content into the ng-view without closing and reopening the div again.

Is this possible?

EDIT:

My routes:

app.config(['$routeProvider', function($routeProvider) {
  $routeProvider.
      when('/dealer/:id', {templateUrl: 'files/tpl/dealer-details.html?20', controller: 'DealerDetailsCtrl', activetab: 'details'}).
      when('/dealermessage/:id', {templateUrl: 'files/tpl/dealer-message.html?124', controller: 'DealerMessageCtrl', activetab: 'message'}).
      when('/dealersendmessage/:id', {templateUrl: 'files/tpl/dealer-details.html?8', controller: 'DealerDetailsCtrl', activetab: 'details'}).
      otherwise({redirectTo: '/dealer'});
}]);  

If a marker has been clicked, the first route and controller are loading.Is this helping out?

EDIT No.2:
The “marker/div toggle is working now but I have now a strange behavior of the opened overlay.

Example:
When I open “Marker 1” the div is opening fine. When the div for “Marker 1” is open, I can click on “Marker 2” and the div refreshes with the content of “Marker 2”. But when I now click on “Marker 1” the div suddenly closes.
How can I stop it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:06:50+00:00Added an answer on June 17, 2026 at 9:06 am

    Still don’t understand it much, but you keep only one model to toggle several markers. So if you click on one marker to open, another marker will close it, since you don’t keep the marker’s state. You probably need something like:

    <div ng-repeat="marker in dealer">
       <a ng-click="details.show=toggle(marker)" href="#/dealer/{{marker.id}}" 
          class="marker" style="left:{{marker.coordleft}}px;top:{{marker.coordtop}}px"></a>
    </div>
    

    In your controller you define the toggle function:

    $scope.toggle = function(marker) {
       marker.show = !marker.show;
    
       return marker.show;
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some markers at my map with infowindow for each of them. Map
I have several markers on my google map. Each has text that should show
I have map with multiple different colors markers with some info window. Everything works
I have a Google V3 map which uses steetView and some map markers. The
Good morning. I have the next code which put some markers in a map
After some advice on how to clear markers on googlemaps, I have a map
I have map where a person can click on a marker location to view
On my map I have some Markers. Onclick I want to get the markers
I have an application showing the map and some markers on it. I use
Hi I am showing some markers on my google map and on click of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.