DevOps研发效能
媒体矩阵
开源中国APP
授权协议 MIT
开发语言 JavaScript
操作系统 跨平台
软件类型 开源软件
所属分类 程序开发地图相关
开源组织
地区 不详
投 递 者 红薯
适用人群 未知
收录时间 2009-06-09

软件简介

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;  
   
});
});
展开阅读全文

评论

点击引领话题📣 发布并加入讨论🔥
暂无内容
发表了博客
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
发表了问答
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
暂无内容
0 评论
56 收藏
分享
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部