jQuery UI Map Init


/ Published in: jQuery
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.