Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using Google maps in my MVC application and need a message to pop up when a driver reaches the end of his route. The pop up must contain the address and the message.
Example "You Have Reached Your Destination at 58 Victoria Street".
Any help will be much appreciated.
Posted

1 solution

I recommend you to use inbuilt classes of BOOTSTRAP POPUP COMPONENTS: http://getbootstrap.com/components/[^]

VB
href="modal_content_name"
    data-toggle="modal"

XML
<div class="modal fade" id="test_modal">
  <div class="modal-header">
    <a class="close" data-dismiss="modal">&times;</a>
    <h3>Hello Sir/Madam</h3>
  </div>
  <div class="modal-body">
    <p>"You Have Reached Your Destination at 58 Victoria Street".</p>
  </div>
  <div class="modal-footer">
    <a href="#" class="btn" data-dismiss="modal">Close</a>
      </div>
</div


XML
<script type="text/javascript">
    $(document).ready(function(){
        $('#test_modal').modal('show');
    });
</script>


By closing the modal popup manually you can use JavaScript

XML
<script type="text/javascript">
$('#test_modal').modal('hide')
</script>


You'll adjust your width and padding to your desire.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900