Drkcore

09 05 2012 jQuery Tweet

googlemapにtwitterのアイコンを貼り付ける

jquery-ui-mapを使ってみた

jQuery UI map

富士山の頂上で"Helllo World"を叫ぶって感じかな

!!! 5
html
  head
    script(type="text/javascript", src="http://maps.google.com/maps/api/js?sensor=true")
    script(type="text/javascript", src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js")
    script(type="text/javascript", src="jquery.ui.map.full.min.js")
    link(rel='stylesheet', href='style.css'))
  body
    #map_canvas
    script
      $('#map_canvas').gmap({'zoom':11, 'center':'35.360556,138.727778'}).bind('init', function(ev, map) {
        $('#map_canvas').gmap('addMarker', {
            'position': '35.360556,138.727778',
            'bounds': false,
            'icon':new google.maps.MarkerImage(
              'https://si0.twimg.com/profile_images/1101313417/40dea9e7-aef7-4320-8d71-6d1108ffa98c.png',
              new google.maps.Size(32, 32),
              new google.maps.Point(0,0),
              new google.maps.Point(0, 32),
              new google.maps.Size(32, 32)
          )
        }).click(function() {
          $('#map_canvas').gmap('openInfoWindow', {'content': 'Hello World!'}, this);
        });
      });

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021