jMaps jQuery的地图插件

程序名称:jMaps

授权协议: MIT

操作系统: 跨平台

开发语言: JavaScript

jMaps 介绍

jMaps 是一个 jQuery 的插件,提供了简单的 API 来访问 Google 地图,主要的功能有:

  • Geocode and reverse any valid address in the world via Google’s geocoding API
  • Search for directions to and from any location
  • Add and remove Markers
  • Add and remove polygons and polylines
  • Add and remove graphic layers on the map
  • Add and remove Google adsense layers
  • Add and remove Traffic layers
  • Get @R_265_4045@ion back such as map center, map size, map type, etc

示例代码

jQuery(document).ready(function(){  
      
    jQuery('#map1').jmap('init', {'mapType':'hybrid','mapCenter':[37.4419, -122.1419]});  
      
    jQuery('#address-submit-1').click(function(){  
        jQuery('#map1').jmap('SearchAddress', {  
            'query': jQuery('#address').val(),  
            'returnType': 'getLocations'  
        }, function(result, options) {  
              
            var valid = Mapifies.SearchCode(result.Status.code);  
            if (valid.success) {  
            jQuery.each(result.Placemark, function(i, point){  
                jQuery('#map1').jmap('AddMarker',{  
                        'pointLatLng':[point.Point.coordinates[1], point.Point.coordinates[]],  
                        'pointHTML':point.address  
                    });  
                });  
            } else {  
                jQuery('#address').val(valid.message);  
            }  
        });  
        return false;     
    });  
});

jMaps 官网

http://code.google.com/p/jmaps/

相关编程语言

多功能下拉选择插件 SelectPage 简洁而强大的下拉分...
AutoComplete 是一个 jQuery Mobile 的插件,用于实...
Combogrid 是一个jQuery插件用于为输入框添加高级自...
Autobox2这个jQuery插件,可以用于创建类似于Facebo...
Link Scraper TextBox 是一个文本框的扩展插件,当你...
Awesomplete 超小超好用的超漂亮的 autocomplete 框...