学习
实践
活动
工具
TVP
写文章

百度地图AP1「建议收藏」

(new BMap.NavigationControl()); //向地图加入一个平移缩放控件 map.addControl(new BMap.MapTypeControl()); //地图类型控件 默认位于地图右上方 map.addControl(new BMap.ScaleControl()); //一个比例尺控件 map.addControl(new BMap.OverviewMapControl ); // //map.centerAndZoom(point,15);//将point移到浏览器中心,而且地图大小调整为15; // map.addControl (new BMap.NavigationControl()); // map.addControl(new BMap.MapTypeControl()); // map.addControl(new BMap.ScaleControl()); // map.addControl(new BMap.OverviewMapControl(

9820

百度地图API开发

1,申请密钥:自己的秘钥 2,初始化头文件 3,创建一个盛放地图的div: 4,初始化地图: 5,丰富地图功能: *添加地图控件: map2.addControl(new BMap.NavigationControl ());//添加平移缩放控件 map2.addControl(new BMap.ScaleControl());//添加比例尺 map2.addControl(new BMap.OverviewControl ());//添加小地图 map2.addControl(new BMap.MapTypeControl());//添加地图类型 **控件参数: 所有: navagationControl参数: type(类型):BMAP_NAVIGATION_CONTROL_LARGE/SMALL/PAN/ROOM(完整,小型,平移部分,缩放部分) 实例:map2.addControl

8220
  • 广告
    关闭

    热门业务场景教学

    个人网站、项目部署、开发环境、游戏服务器、图床、渲染训练等免费搭建教程,多款云服务器20元起。

  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    自定义mapbox插件 - 地图快照下载(JS)

    map.addControl(new mapboxgl.NavigationControl()); // 官方代码 // 插件的类 class Map2img { constructor() { } } map.addControl(new Map2img ()); 上述代码为mapbox的一个示例,mapbox 提供了addControl这个api 用于将插件引入地图,在初始化好一个类 为了更详细的了解这两个方法的作用,直接去mapbox-gl-js里面搜索addControl。 mapbox-gl部分代码: addControl(control: IControl, position? ) { return this.fire(new ErrorEvent(new Error( 'Invalid argument to map.addControl

    2K40

    Qt编写地图综合应用6-百度在线地图

    map.enableKeyboard(true);"); } //向地图中添加缩放控件 if (showNavigationControl) { list << QString(" map.addControl isOpen:1}));"); } //向地图中添加比例尺控件 if (showScaleControl) { list << QString(" map.addControl 卫星图:BMAP_SATELLITE_MAP 混合图:BMAP_HYBRID_MAP 三维图:BMAP_PERSPECTIVE_MAP list << QString(" map.addControl list << QString(" ctrlPan.setOffset(new BMap.Size(20, 50));"); list << QString(" map.addControl list << QString(" ctrlTra.setAnchor(BMAP_ANCHOR_BOTTOM_RIGHT);"); list << QString(" map.addControl

    85130

    openlayers实现多图显示

    new OpenLayers.Map('map2', options); map1.addLayer(getWms("china")); map1.addControl (new OpenLayers.Control.Zoom()); map1.addControl(new OpenLayers.Control.Navigation()); map1.zoomToExtent(bounds); map2.addLayer(getWms("province")); map2.addControl (new OpenLayers.Control.Zoom()); map2.addControl(new OpenLayers.Control.Navigation());

    57530

    openlayers实现在线编辑

    3、添加编辑控件 var editor = new OpenLayers.Control.ModifyFeature(vectors); map1.addControl new OpenLayers.Map('map1', options); map1.addLayer(getWms("china")); map1.addControl (new OpenLayers.Control.Zoom()); map1.addControl(new OpenLayers.Control.Navigation()); addEditor(){ var editor = new OpenLayers.Control.ModifyFeature(vectors); map1.addControl

    1.2K20

    openlayers之selectfeature

    new OpenLayers.Map('map1', options); map1.addLayer(getWms("china")); map1.addControl (new OpenLayers.Control.Zoom()); map1.addControl(new OpenLayers.Control.Navigation()); true, highlightOnly:true } ); map1.addControl new OpenLayers.Map('map1', options); map1.addLayer(getWms("china")); map1.addControl (new OpenLayers.Control.Zoom()); map1.addControl(new OpenLayers.Control.Navigation());

    59820

    angularJs集成百度地图

    ResourceMapControl.prototype = new BMap.Control(); $scope.mapObj.addControl scope.mapObj.enableKeyboard(); $scope.mapObj.disableDoubleClickZoom(); $scope.mapObj.addControl (top_left_navigation); $scope.mapObj.addControl(top_left_control); $scope.mapObj.addControl (overViewOpen); $scope.mapObj.addControl(new BMap.MapTypeControl());

    13310

    openlayers2渐变色渲染

    OpenLayers.INCHES_PER_UNIT["英寸"] = OpenLayers.INCHES_PER_UNIT["ft"]; //比例尺 map.addControl topInUnits:"米",bottomOutUnits:"英里", bottomInUnits:"英寸" })); map.addControl (new OpenLayers.Control.Zoom()); map.addControl(new OpenLayers.Control.Navigation()); map.addControl(new OpenLayers.Control.OverviewMap()); map.zoomToExtent(bounds);

    1.2K20

    Openlayers2唯一值渲染

    OpenLayers.INCHES_PER_UNIT["英寸"] = OpenLayers.INCHES_PER_UNIT["ft"]; //比例尺 map.addControl topInUnits:"米",bottomOutUnits:"英里", bottomInUnits:"英寸" })); map.addControl (new OpenLayers.Control.Zoom()); map.addControl(new OpenLayers.Control.Navigation()); map.addControl(new OpenLayers.Control.OverviewMap()); map.zoomToExtent(bounds);

    43020

    Openlayers2中聚类的动态实现

    to selection box: false } ); map.addControl new OpenLayers.Map('map', mapOptions ); map.addLayer(getWms("province")); map.addControl (new OpenLayers.Control.Zoom()); map.addControl(new OpenLayers.Control.Navigation()); to selection box: false } ); map.addControl

    76430

    js 百度地图

    new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_LARGE}); map.addControl var ctrl_ove = new BMap.OverviewMapControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,isOpen:1}); map.addControl //向地图中添加比例尺控件 var ctrl_sca = new BMap.ScaleControl({anchor:BMAP_ANCHOR_BOTTOM_LEFT}); map.addControl

    39420

    PostGIS+QGIS+GeoServer+OpenLayers实现数据的存储、服务的发布以及地图的显示

    units: "degrees", controls: [] }; map = new OpenLayers.Map('map', mapOptions ); map.addControl (new OpenLayers.Control.PanZoomBar({ position: new OpenLayers.Pixel(2, 15) })); map.addControl (new OpenLayers.Control.Navigation()); map.addControl(new OpenLayers.Control.Scale($('scale'))); map.addControl(new OpenLayers.Control.MousePosition({element: $('location')})); var wms = new OpenLayers.Layer.WMS

    4K41

    GeoWebCache的配置与使用

    units: "degrees", controls: [] }; map = new OpenLayers.Map('map', mapOptions ); map.addControl (new OpenLayers.Control.PanZoomBar({ position: new OpenLayers.Pixel(2, 15) })); map.addControl (new OpenLayers.Control.Navigation()); map.addControl(new OpenLayers.Control.Scale($('scale'))); map.addControl(new OpenLayers.Control.MousePosition({element: $('location')})); demolayer = new

    1.7K40

    微信开发系列之八 - 微信公众号的地图集成

    vm.map.enableKeyboard(); vm.map.enableContinuousZoom(); vm.map.enableInertialDragging(); vm.map.addControl (new BMap.NavigationControl()); vm.map.addControl(new BMap.ScaleControl()); vm.map.addControl (new BMap.OverviewMapControl()); vm.map.addControl(new BMap.MapTypeControl()); search(); }

    35030

    点图层叠加与事件响应

    singleTile: true }); map.addLayers([tiled,wms]); map.addControl (new OpenLayers.Control.Zoom()); map.addControl(new OpenLayers.Control.Navigation()); map.addControl(new OpenLayers.Control.MousePosition()); map.zoomToExtent(bounds);

    35030

    前端切图:调用百度地图API

    BMAP_ANCHOR_TOP_LEFT, type: BMAP_NAVIGATION_CONTROL_LARGE }); map.addControl anchor: BMAP_ANCHOR_BOTTOM_RIGHT, isOpen: 1 }); map.addControl BMap.ScaleControl({ anchor: BMAP_ANCHOR_BOTTOM_LEFT }); map.addControl

    70330

    在地图上绘制路线图

    ("container"); map.centerAndZoom(new BMap.Point(108.847098,34.553311), 19); map.addControl (new BMap.NavigationControl()); // 添加平移缩放控件 map.addControl(new BMap.ScaleControl ()); // 添加比例尺控件 map.addControl(new BMap.OverviewMapControl());

    11610

    大量POI的解决方案2

    OpenLayers.INCHES_PER_UNIT["英寸"] = OpenLayers.INCHES_PER_UNIT["ft"]; //比例尺 map.addControl topInUnits:"米",bottomOutUnits:"英里", bottomInUnits:"英寸" })); map.addControl (new OpenLayers.Control.Zoom()); map.addControl(new OpenLayers.Control.Navigation()); map.addControl(new OpenLayers.Control.OverviewMap()); map.zoomToExtent(bounds); }; var select = new OpenLayers.Control.SelectFeature(vectors, options); map.addControl

    42050

    扫码关注腾讯云开发者

    领取腾讯云代金券