• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

joggink/mobileGmap: Responsive google maps

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

joggink/mobileGmap

开源软件地址(OpenSource Url):

https://github.com/joggink/mobileGmap

开源编程语言(OpenSource Language):

JavaScript 84.9%

开源软件介绍(OpenSource Introduction):

jQuery responsive google maps

What's it all about?

Well, when scrolling a website on your mobile device you can get trapped in a google map due to the Maps scrollbar of death™. This plugin gives you a native google maps on your website and a safe fallback to the static image API of google maps for smaller devices.

More info can be found here: http://joggink.com/2012/01/responsive-google-maps/

How to use?

Download the jquery.mobilegmap.js. Removing comments and minifying it will get you bonus points!

To use it:

$(document).ready(function(){

  // your google map container
  $('.gmap').mobileGmap();

})

You can optionally change these default parameters:

$(document).ready(function(){

  // your google map container
  $('.gmap').mobileGmap({
    deviceWidth: 480 // The select will be added for screensizes smaller than this
  });

})

If you want to pass the address, zoom level and the maptype you can use HTML5 data-attributes

  <div class="gmap" id="map" data-center="Brugse Heirweg 37 Aartrijke Belgium" data-zoom="15">
    <address>
      <strong>builtbyrobot</strong><br />
      Brugse Heirweg 37<br />
      8211 Aartrijke
    </address>
  </div>

And that's it that's all.

However...

There are still some things that need to be taken care of:

  • make it optional to show / hide the address marker
  • add multiple markers with balloons containing more info / fallback with numbers or letters for the mobile version



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
mercadolibre/mobile-dependencies_whitelist: Whitelist dependencies files for mob ...发布时间:2022-08-30
下一篇:
polinema-mobile/2019-mobile02发布时间:2022-08-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap