Posted By

vagrantradio on 05/10/12


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

StrawMan
BrockSamsom


jQuery UI Map Init


 / Published in: jQuery
 

URL: http://code.google.com/p/jquery-ui-map/

basic needs to run a jquery.ui.map init - for my own reference.

  1. /* head */
  2. <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
  3. <script type="text/javascript" src="/shared/plugins/jquery.ui.map.js"></script>
  4. <script type="text/javascript" src="/shared/plugins/jquery.ui.map.overlays.js"></script>
  5. <script type="text/javascript" src="/shared/plugins/jquery.ui.map.extensions.js"></script>
  6.  
  7. /* style */
  8. <style>
  9. .ui-mobile-rendering>*{visibility:visible;}
  10. #map_canvas {
  11. height: 600px;
  12. min-height:100%;
  13. width: 100%;
  14. }
  15. </style>
  16.  
  17. /* init */
  18. $("#map_canvas").gmap({"center": '42.89515,-85.81172', "zoom": 16, "callback": function() {
  19. var self = this;
  20. self.addMarker({'position': this.get('map').getCenter() });
  21. self.addShape('Circle', { 'strokeWeight': 2, 'strokeColor': "#008595", 'fillColor': "#008595", 'fillOpacity': 0.25, 'center': this.get('map').getCenter(), 'radius': 200, clickable: false });
  22. }});//map canvas function

Report this snippet  

You need to login to post a comment.