Jquery中文网 www.jquerycn.cn
Jquery中文网 >  jQuery  >  jQuery 插件  >  正文 jQuery的地图插件 jMaps

jQuery的地图插件 jMaps

发布时间:2014-05-02   编辑:www.jquerycn.cn
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 *
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 information 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;       });});

您可能感兴趣的文章:
jQuery的地图插件 jMaps
jMaps Framework
jQuery地铁线路图插件 subwayMap
jquery.googlemap
jQuery向导插件 Jquery Wizard Plugin
经典海量jQuery插件 大家可以收藏一下
海量经典的jQuery插件集合
jQuery的插件列表(2010-1-25更新)
显示矢量地图的jQuery 插件 jVectorMap
jQuery的Google地图插件 GMAP3

[关闭]