- 浏览: 440282 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
sunwang810812:
万分感谢中!!!!!这么多年终于看到一个可运行可解决的方案!! ...
POI 后台生成Excel,在前台显示进度 -
zzb7728317:
LZ正解
Spring Jackson AjaxFileUpload 没有执行回调函数的解决办法 -
sleeper_qp:
lz是在源码上修改的么? 源码的话你重新编译一遍了么? 可 ...
由nutch readseg -dump 中文编码乱码想到的…… -
shenjian430:
请问你改好的程序在写在哪了?
由nutch readseg -dump 中文编码乱码想到的…… -
yinxusen:
It seems to be the bug occur in ...
Mahout Local模式 执行example的注意点
首先声明感谢http://google-maps-utility-library-v3.googlecode.com/svn/tags/keydragzoom/1.0/docs/examples.html的作者,我参考他的keydragzoom,修改了他的源码完成了我的dragzoomcontrol。
先介绍一下DragZoomControl,简单的很就是在第三版的Google Map中,添加一个按钮,点击“DragZoom”按钮后进行框选操作,框选完成后可以跟后台进行Ajax交互,这里的例子是将框选的southwest和northeast传给后台再传到前台。(有点无聊)。
然后就是贴上代码:
dragzoomcontrol.js:
(function () { /** * Converts 'thin', 'medium', and 'thick' to pixel widths * in an MSIE environment. Not called for other browsers * because getComputedStyle() returns pixel widths automatically. * @param {String} widthValue */ var toPixels = function (widthValue) { var px; switch (widthValue) { case 'thin': px = "2px"; break; case 'medium': px = "4px"; break; case 'thick': px = "6px"; break; default: px = widthValue; } return px; }; /** * Get the widths of the borders of an HTML element. * * @param {Object} h HTML element * @return {Object} widths object (top, bottom left, right) */ var getBorderWidths = function (h) { var computedStyle; var bw = {}; if (document.defaultView && document.defaultView.getComputedStyle) { computedStyle = h.ownerDocument.defaultView.getComputedStyle(h, ""); if (computedStyle) { // The computed styles are always in pixel units (good!) bw.top = parseInt(computedStyle.borderTopWidth, 10) || 0; bw.bottom = parseInt(computedStyle.borderBottomWidth, 10) || 0; bw.left = parseInt(computedStyle.borderLeftWidth, 10) || 0; bw.right = parseInt(computedStyle.borderRightWidth, 10) || 0; return bw; } } else if (document.documentElement.currentStyle) { // MSIE if (h.currentStyle) { // The current styles may not be in pixel units so try to convert (bad!) bw.top = parseInt(toPixels(h.currentStyle.borderTopWidth), 10) || 0; bw.bottom = parseInt(toPixels(h.currentStyle.borderBottomWidth), 10) || 0; bw.left = parseInt(toPixels(h.currentStyle.borderLeftWidth), 10) || 0; bw.right = parseInt(toPixels(h.currentStyle.borderRightWidth), 10) || 0; return bw; } } // Shouldn't get this far for any modern browser bw.top = parseInt(h.style["border-top-width"], 10) || 0; bw.bottom = parseInt(h.style["border-bottom-width"], 10) || 0; bw.left = parseInt(h.style["border-left-width"], 10) || 0; bw.right = parseInt(h.style["border-right-width"], 10) || 0; return bw; }; /** * Get the position of the mouse relative to the document. * @param {Object} e Mouse event * @return {Object} left & top position */ var getMousePosition = function (e) { var posX = 0, posY = 0; e = e || window.event; if (typeof e.pageX !== "undefined") { posX = e.pageX; posY = e.pageY; } else if (typeof e.clientX !== "undefined") { posX = e.clientX + (typeof document.documentElement.scrollLeft !== "undefined" ? document.documentElement.scrollLeft : document.body.scrollLeft); posY = e.clientY + (typeof document.documentElement.scrollTop !== "undefined" ? document.documentElement.scrollTop : document.body.scrollTop); } return { left: posX, top: posY }; }; /** * Get the position of an HTML element relative to the document. * @param {Object} h HTML element * @return {Object} left & top position */ var getElementPosition = function (h) { var posX = h.offsetLeft; var posY = h.offsetTop; var parent = h.offsetParent; // Add offsets for all ancestors in the hierarchy while (parent !== null) { // Adjust for scrolling elements which may affect the map position. if (parent !== document.body && parent !== document.documentElement) { posX -= parent.scrollLeft; posY -= parent.scrollTop; } posX += parent.offsetLeft; posY += parent.offsetTop; parent = parent.offsetParent; } return { left: posX, top: posY }; }; /** * Set the properties of an object to those from another object. * @param {Object} obj target object * @param {Object} vals source object */ var setVals = function (obj, vals) { if (obj && vals) { for (var x in vals) { if (vals.hasOwnProperty(x)) { obj[x] = vals[x]; } } } return obj; }; /** * Set the opacity. If op is not passed in, this function just performs an MSIE fix. * @param {Node} div * @param {Number} op (0-1) */ var setOpacity = function (div, op) { if (typeof op !== 'undefined') { div.style.opacity = op; } if (typeof div.style.opacity !== 'undefined') { div.style.filter = "alpha(opacity=" + (div.style.opacity * 100) + ")"; } }; function DragZoom(map, opt_zoomOpts) { var ov = new google.maps.OverlayView(); var me = this; ov.onAdd = function () { me.init_(map, opt_zoomOpts); }; ov.draw = function () { }; ov.onRemove = function () { }; ov.setMap(map); this.prjov_ = ov; } /** * Init the tool. */ DragZoom.prototype.init_ = function (map, opt_zoomOpts) { // Set CSS styles for the DIV containing the control this.controlDiv_=opt_zoomOpts.controlDiv; this.controlDiv_.style.paddingTop = '5px'; // Set CSS for the control border var controlUI = document.createElement('DIV'); controlUI.style.backgroundColor = '#FFFFFF'; controlUI.style.borderColor = '#717B87'; controlUI.style.borderStyle = 'solid'; controlUI.style.borderWidth = '1px'; controlUI.style.boxShadow = '1px 2px 4px #888888'; controlUI.style.cursor = 'pointer'; controlUI.style.textAlign = 'center'; controlUI.title = 'Click to Active the map DragZoom'; this.controlDiv_.appendChild(controlUI); // Set CSS for the control interior var controlText = document.createElement('DIV'); controlText.style.fontFamily = 'Arial,sans-serif'; controlText.style.fontSize = '12px'; controlText.style.paddingBottom = '1px'; controlText.style.paddingLeft = '4px'; controlText.style.paddingRight = '4px'; controlText.style.paddingTop = '1px'; controlText.innerHTML = 'DragZoom'; controlUI.appendChild(controlText); this.map_ = map; opt_zoomOpts = opt_zoomOpts || {}; this.borderWidths_ = getBorderWidths(this.map_.getDiv());//Container()); this.paneDiv_ = document.createElement("div"); this.paneDiv_.onselectstart = function () { return false; }; // default style setVals(this.paneDiv_.style, { backgroundColor: 'white', opacity: 0.0, cursor: 'crosshair' }); // allow overwrite setVals(this.paneDiv_.style, opt_zoomOpts.paneStyle); // stuff that cannot be overwritten setVals(this.paneDiv_.style, { position: 'absolute', overflow: 'hidden', zIndex: 10001, display: 'none' }); setOpacity(this.paneDiv_); // An IE fix: if the background is transparent, it cannot capture mousedown events if (this.paneDiv_.style.backgroundColor === 'transparent') { this.paneDiv_.style.backgroundColor = 'white'; setOpacity(this.paneDiv_, 0); } this.map_.getDiv().appendChild(this.paneDiv_);//Container() this.boxDiv_ = document.createElement('div'); setVals(this.boxDiv_.style, { border: 'thin solid #FF0000' }); setVals(this.boxDiv_.style, opt_zoomOpts.boxStyle); setVals(this.boxDiv_.style, { position: 'absolute', display: 'none' }); setOpacity(this.boxDiv_); this.map_.getDiv().appendChild(this.boxDiv_); this.boxBorderWidths_ = getBorderWidths(this.boxDiv_); var me = this; this.controlUIDownListener_ = google.maps.event.addDomListener(controlUI, 'click', function() { me.onControlUIClick_(); }); this.mouseDownListener_ = google.maps.event.addDomListener(this.paneDiv_, 'mousedown', function (e) { me.onMouseDown_(e); }); this.mouseDownListenerDocument_ = google.maps.event.addDomListener(document, 'mousedown', function (e) { me.onMouseDownDocument_(e); }); this.mouseMoveListener_ = google.maps.event.addDomListener(document, 'mousemove', function (e) { me.onMouseMove_(e); }); this.mouseUpListener_ = google.maps.event.addDomListener(document, 'mouseup', function (e) { me.onMouseUp_(e); }); this.controlUIDown_ = false; this.dragging_ = false; this.startPt_ = null; this.endPt_ = null; this.boxMaxX_ = null; this.boxMaxY_ = null; this.mousePosn_ = null; this.mapPosn_ = getElementPosition(this.map_.getDiv()); this.mouseDown_ = false; }; /** * Checks if the mouse is on top of the map. The position is captured * in onMouseMove_. * @return true if mouse is on top of the map div. */ DragZoom.prototype.isMouseOnMap_ = function () { var mousePos = this.mousePosn_; if (mousePos) { var mapPos = this.mapPosn_; var mapDiv = this.map_.getDiv(); return mousePos.left > mapPos.left && mousePos.left < mapPos.left + mapDiv.offsetWidth && mousePos.top > mapPos.top && mousePos.top < mapPos.top + mapDiv.offsetHeight; } else { // if user never moved mouse return false; } }; /** * Show or hide the overlay pane, depending on whether the mouse is over the map. */ DragZoom.prototype.setPaneVisibility_ = function () { if (this.map_ && this.controlUIDown_ && this.isMouseOnMap_()) { //alert("setPaneVisibility_"); var mapDiv = this.map_.getDiv(); this.paneDiv_.style.left = 0 + 'px'; this.paneDiv_.style.top = 0 + 'px'; this.paneDiv_.style.width = mapDiv.offsetWidth - (this.borderWidths_.left + this.borderWidths_.right) + 'px'; this.paneDiv_.style.height = mapDiv.offsetHeight - (this.borderWidths_.top + this.borderWidths_.bottom) + 'px'; this.paneDiv_.style.display = 'block'; this.boxMaxX_ = parseInt(this.paneDiv_.style.width, 10) - (this.boxBorderWidths_.left + this.boxBorderWidths_.right); this.boxMaxY_ = parseInt(this.paneDiv_.style.height, 10) - (this.boxBorderWidths_.top + this.boxBorderWidths_.bottom); } else { this.paneDiv_.style.display = 'none'; } }; DragZoom.prototype.onControlUIClick_ = function () { if (this.map_ && !this.controlUIDown_) { //alert("onControlUIDown_"); this.controlUIDown_ = true; this.controlDiv_.childNodes.item(0).style.backgroundColor = '#E8E8E8'; this.controlDiv_.childNodes.item(0).childNodes.item(0).style.fontWeight = 'bold'; this.setPaneVisibility_(); /** * This event is fired when the ControlUI button is pressed. * @name DragZoom#activate * @event */ google.maps.event.trigger(me, 'activate'); }else { alert("onControlUIUp_"); this.controlUIDown_ = false; this.dragging_ = false; this.controlDiv_.childNodes.item(0).style.backgroundColor = '#FFFFFF'; this.controlDiv_.childNodes.item(0).childNodes.item(0).style.fontWeight = 'normal'; this.boxDiv_.style.display = 'none'; this.paneDiv_.style.display = "none"; /** * This event is fired while the user release the controlUI * @name DragZoom#deactivate * @event */ google.maps.event.trigger(this, 'deactivate'); } }; /** * Get the <code>google.maps.Point</code> of the mouse position. * @param {Object} e * @return {google.maps.Point} point * @private */ DragZoom.prototype.getMousePoint_ = function (e) { var mousePosn = getMousePosition(e); var p = new google.maps.Point(); p.x = mousePosn.left - this.mapPosn_.left - this.borderWidths_.left; p.y = mousePosn.top - this.mapPosn_.top - this.borderWidths_.top; p.x = Math.min(p.x, this.boxMaxX_); p.y = Math.min(p.y, this.boxMaxY_); p.x = Math.max(p.x, 0); p.y = Math.max(p.y, 0); return p; }; /** * Handle mouse down. * @param {Event} e */ DragZoom.prototype.onMouseDown_ = function (e) { if (this.map_ && this.controlUIDown_) { this.mapPosn_ = getElementPosition(this.map_.getDiv()); this.dragging_ = true; this.startPt_ = this.endPt_ = this.getMousePoint_(e); var prj = this.prjov_.getProjection(); var latlng = prj.fromDivPixelToLatLng(this.startPt_); /** * This event is fired when the drag operation begins. * @name DragZoom#dragstart * @param {GLatLng} startLatLng * @event */ google.maps.event.trigger(this, 'dragstart', latlng); } }; /** * Handle mouse down at the document level. * @param {Event} e */ DragZoom.prototype.onMouseDownDocument_ = function (e) { this.mouseDown_ = true; }; /** * Handle mouse move. * @param {Event} e */ DragZoom.prototype.onMouseMove_ = function (e) { this.mousePosn_ = getMousePosition(e); if (this.dragging_) { this.endPt_ = this.getMousePoint_(e); var left = Math.min(this.startPt_.x, this.endPt_.x); var top = Math.min(this.startPt_.y, this.endPt_.y); var width = Math.abs(this.startPt_.x - this.endPt_.x); var height = Math.abs(this.startPt_.y - this.endPt_.y); this.boxDiv_.style.left = left + 'px'; this.boxDiv_.style.top = top + 'px'; this.boxDiv_.style.width = width + 'px'; this.boxDiv_.style.height = height + 'px'; this.boxDiv_.style.display = 'block'; /** * This event is repeatedly fired while the user drags the box. The southwest and northeast * point are passed as parameters of type <code>google.maps.Point</code> (for performance reasons), * relative to the map container. Note: the event listener is responsible * for converting Pixel to LatLng, if necessary. * @name DragZoom#drag * @param {google.maps.Point} southwestPixel * @param {google.maps.Point} northeastPixel * @event */ google.maps.event.trigger(this, 'drag', new google.maps.Point(left, top + height), new google.maps.Point(left + width, top)); } else if (!this.mouseDown_) { this.setPaneVisibility_(); } }; /** * Handle mouse up. * @param {Event} e */ DragZoom.prototype.onMouseUp_ = function (e) { this.mouseDown_ = false; if (this.dragging_) { var left = Math.min(this.startPt_.x, this.endPt_.x); var top = Math.min(this.startPt_.y, this.endPt_.y); var width = Math.abs(this.startPt_.x - this.endPt_.x); var height = Math.abs(this.startPt_.y - this.endPt_.y); var prj = this.prjov_.getProjection(); // 2009-05-29: since V3 does not have fromContainerPixel, var containerPos = getElementPosition(this.map_.getDiv()); var mapPanePos = getElementPosition(this.prjov_.getPanes().mapPane); left = left + (containerPos.left - mapPanePos.left); top = top + (containerPos.top - mapPanePos.top); var sw = prj.fromDivPixelToLatLng(new google.maps.Point(left, top + height)); var ne = prj.fromDivPixelToLatLng(new google.maps.Point(left + width, top)); var bnds = new google.maps.LatLngBounds(sw, ne); this.map_.fitBounds(bnds); this.controlUIDown_ = false; this.dragging_ = false; this.controlDiv_.childNodes.item(0).style.backgroundColor = '#FFFFFF'; this.controlDiv_.childNodes.item(0).childNodes.item(0).style.fontWeight = 'normal'; this.boxDiv_.style.display = 'none'; /** * This event is fired when the drag operation ends. * Note that the event is not fired if the hot key is released before the drag operation ends. * @name DragZoom#dragend * @param {GLatLngBounds} newBounds * @event */ google.maps.event.trigger(this, 'dragend', bnds); } }; /** * @name google.maps.Map * @class These are new methods added to the Google Maps API's * <a href = 'http://code.google.com/apis/maps/documentation/v3/reference.html#Map'>Map</a> * class. */ /** * Enable drag zoom. The user can zoom to an area of interest by holding down the hot key * <code>(shift | ctrl | alt )</code> while dragging a box around the area. * @param {KeyDragZoomOptions} opt_zoomOpts */ google.maps.Map.prototype.enableKeyDragZoom = function (opt_zoomOpts) { this.dragZoom_ = new DragZoom(this, opt_zoomOpts); }; /** * Disable drag zoom. */ google.maps.Map.prototype.disableKeyDragZoom = function () { var d = this.dragZoom_; if (d) { alert("disableKeyDragZoom"); google.maps.event.removeListener(d.mouseDownListener_); google.maps.event.removeListener(d.mouseDownListenerDocument_); google.maps.event.removeListener(d.mouseMoveListener_); google.maps.event.removeListener(d.mouseUpListener_); google.maps.event.removeListener(d.controlUIDownListener_); google.maps.event.removeListener(d.controlUIUpListener_); this.getDiv().removeChild(d.boxDiv_); this.getDiv().removeChild(d.paneDiv_); this.dragZoom_ = null; } }; /** * Returns true if the drag zoom feature has been enabled. * @return {Boolean} */ google.maps.Map.prototype.keyDragZoomEnabled = function () { return this.dragZoom_ !== null; }; /** * Returns the DragZoom object which is created when <code>google.maps.Map.enableKeyDragZoom</code> is called. * With this object you can use <code>google.maps.event.addListener</code> to attach event listeners * for the 'activate', 'deactivate', 'dragstart', 'drag', and 'dragend' events. * @return {DragZoom} */ google.maps.Map.prototype.getDragZoomObject = function () { return this.dragZoom_; }; })();
index.jsp:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <style> #map { width: 700px; height: 400px; } </style> <script type="text/javascript" src="js/jquery-1.7.min.js"></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="js/dragzoomcontrol.js"></script> <script type="text/javascript"> var map; var markersArray = []; var center = new google.maps.LatLng(30.67, 104.06); function init() { var myOptions = { zoom: 13, center: center, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("map"), myOptions); // Create the DIV to hold the control and // call the DragZoomControl() constructor passing in this DIV. var dragZoomControlDiv = document.createElement('DIV'); dragZoomControlDiv.index = 1; map.controls[google.maps.ControlPosition.TOP_RIGHT].push(dragZoomControlDiv); map.enableKeyDragZoom({ controlDiv: dragZoomControlDiv, boxStyle: { opacity: 0.7 }, paneStyle: { backgroundColor: "gray", opacity: 0.1 } }); var dz = map.getDragZoomObject(); google.maps.event.addListener(dz, 'activate', function() { log('DragZoom Activated'); }); google.maps.event.addListener(dz, 'dragstart', function(latlng) { log('DragZoom Started: ' + latlng); }); google.maps.event.addListener(dz, 'drag', function(start, end) { //log('DragZoom Dragging...' + start + end); }); google.maps.event.addListener(dz, 'dragend', function(bnds) { log('DragZoom DragEnd :' + bnds); $.ajax({ url: 'AjaxMap', type: 'post', dataType: 'json', data: { swlat: bnds.getSouthWest().lat(), swlng: bnds.getSouthWest().lng(), nelat: bnds.getNorthEast().lat(), nelng: bnds.getNorthEast().lng() }, success: function(jsonMsg){ //var json = [eval('(' +jsonMsg +')')]; var json=jsonMsg; var sw = new google.maps.LatLng(json.swlat, json.swlng); var ne = new google.maps.LatLng(json.nelat, json.nelng); deleteOverlays(); addMarker(sw); addMarker(ne); } }); }); google.maps.event.addListener(dz, 'deactivate', function() { log('DragZoom Deactivated'); }); } function addMarker(location) { marker = new google.maps.Marker({ position: location, map: map, title: "Hello World" }); markersArray.push(marker); } function deleteOverlays() { if (markersArray) { for (i in markersArray) { markersArray[i].setMap(null); } markersArray.length = 0; } } function log(msg){ $("#msg").html($("#msg").html()+"<br/>"+msg); //document.getElementById('msg').innerHTML +="<br/>"+msg; } </script> </head> <body onload="init()"> <div id="map"></div> <br/> <div id="msg"></div> </body> </html>
后台的servlet:
package com.wujay; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.simple.JSONObject; public class AjaxMap extends HttpServlet { public AjaxMap() { super(); } public void destroy() { super.destroy(); // Just puts "destroy" string in log // Put your code here } public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=gbk"); PrintWriter out=response.getWriter(); String swlat=request.getParameter("swlat"); String swlng=request.getParameter("swlng"); String nelat=request.getParameter("nelat"); String nelng=request.getParameter("nelng"); JSONObject obj=new JSONObject(); obj.put("swlat",swlat); obj.put("swlng",swlng); obj.put("nelat",nelat); obj.put("nelng",nelng); out.print(obj); out.flush(); out.close(); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } public void init() throws ServletException { // Put your code here } }
web.xml:
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <servlet> <servlet-name>AjaxMap</servlet-name> <servlet-class>com.wujay.AjaxMap</servlet-class> </servlet> <servlet-mapping> <servlet-name>AjaxMap</servlet-name> <url-pattern>/AjaxMap</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app>
我把MyEclipse工程作为附件有需要的可以看看。
The End
- DragZoomControl.zip (56.4 KB)
- 下载次数: 27
发表评论
-
hibernate的Criteria Query(转)
2014-06-29 21:22 712当查询数据时,人们往往需要设置查询条件。在SQL或HQL语句 ... -
【转】hibernate 中 Criteria 的使用介绍
2014-06-29 21:21 964转自:http://www.blogjava.net/jjs ... -
【转】Hibernate中Criteria的完整用法
2014-06-29 21:20 720转自:http://www.cnblogs.com/maba ... -
Java读写Oracle中的BLOB和CLOB
2013-10-16 18:00 2009转:http://www.iteye.com/topic/6 ... -
Spring的事务管理入门:编程式事务管理(TransactionTemplate)
2013-10-15 16:20 1027可有效应用于Oracle 临时表的insert和select ... -
jdbcTemplate 调用存储过程和回到函数
2013-10-15 09:09 3766转:http://blog.csdn.net/dancelo ... -
Spring3核心技术之JdbcTemplate
2013-10-15 09:03 1323转:http://zhou137520.iteye.com/ ... -
验证码在WebLogic下报错java.io.IOException: response already committed
2013-05-06 14:16 2603我的登录验证码代码,一个jsp,在Tomcat下没有问题,但 ... -
Struts2在eclipse的console中总是出现WARN OgnlValueStack:45 - Could not find property
2013-04-17 18:00 1723struts2 在发开时,控制台如输出大量警告信息,太烦人 ... -
【转】Eclipse自动关闭解决方法及eclipse.ini设置
2013-03-29 15:21 3807转自:http://liujun5563.blog.163. ... -
[转]批量将Java源代码文件的编码从GBK转为UTF-8
2012-11-12 13:43 1502转自:http://my.oschina.net/binny/ ... -
对代理模式与Java动态代理类的理解
2012-09-25 01:51 01. 代理模式 代理模式的作用是:为其他对象提供一种 ... -
【转】 java中yield(),sleep()以及wait()的区别
2012-09-13 22:49 848从操作系统的角度讲,os会维护一个ready queue(就绪 ... -
java 继承类 变量、静态变量、构造函数执行顺序
2012-09-10 16:07 1048包含普通变量、静态变量、构造函数、继承类的执行顺序为: 1、父 ... -
京东2012春笔试编程题
2012-09-10 12:58 01、求给定数组中最大的K个数function array[] ... -
Java实现Stack、Queue、BinaryTree
2012-09-11 10:28 14711、用数组实现Stack: public class MySt ... -
Java中a++和++a的分析
2012-09-18 08:34 2866本人从编译后的代码来看a++和++a的区别: 先看代码1: ... -
华为2012校园上机编程题
2012-09-09 16:04 0/** * 1. 手机号码合法 ... -
2011年9月7日,华为上机题Java实现
2012-09-08 15:58 0第二题: /** * 输入字符串长度len,字符串str, ... -
Java对于Cookie的操作详解
2012-09-18 08:34 8171.设置Cookie Cookie cookie = n ...
相关推荐
谷歌地图API V3是Google提供的一套用于在网页上嵌入地图、进行地理位置处理的JavaScript接口。这个API允许开发者在自己的网站上创建交互式地图,包括但不限于定位、标记、信息窗口、路线规划等功能。本教程将对谷歌...
谷歌地图 Google Map API V3 中文开发文档 谷歌地图 Google Map API V3 中文开发文档是 Google 公司提供的一种基于 Web 的地图应用程序接口,允许开发者在自己的网站或应用程序中嵌入谷歌地图,以提供地图检索、...
在IT行业中,Google Map V3是Google Maps API的第三大主要版本,专为Web开发者设计,用于在网页上集成和自定义地图功能。这个“google map v3离线地图资源包”显然提供了一种方法,使得用户能够在没有互联网连接的...
**正文** Google Map V3是Google Maps API的一个重要版本,主要针对Web开发,提供了一...虽然教程是翻译版,但其内容完整性可以帮助开发者在没有网络支持的情况下也能深入理解并掌握Google Maps API V3的使用技巧。
**Google Map V3 API**是谷歌提供的一种用于在网页中集成地图功能的接口,它允许开发者利用JavaScript语言创建交互式的地图应用。这个API是Google Maps API的第三个主要版本,提供了更多的功能、更好的性能以及更...
由于这个压缩包名为"WebMap",里面可能包含了一个简单的web应用,展示如何使用谷歌地图API V3来创建一个网页地图。开发者可以通过分析和学习这个源码,了解上述知识点的实际应用,并进一步扩展自己的地图应用开发...
Google Map V3 开放手册 开放文档 里面包含了 Map类 方法 属性 是咧
谷歌地图JavaScript API V3是谷歌提供的用于在网页中嵌入交互式地图的服务。这个API允许开发者通过JavaScript编程语言创建各种地图应用,包括自定义标记、信息窗口、路线规划、地理编码、以及各种地图样式和控件。V3...
**谷歌地图API V3详解** 谷歌地图API(Google Maps API)是谷歌提供的一套用于在网页上嵌入交互式地图的开发工具。V3版本是其一个重要的更新,旨在提高性能、简化API接口并减少对JavaScript库的依赖。这篇博文将...
**WPF Google Map V3 示例详解** 在Windows Presentation Foundation(WPF)开发中,集成Google Maps API可以帮助我们创建丰富的地理信息系统应用。本示例重点介绍了如何在WPF项目中使用Google Maps API V3,实现...
**GoogleMap V3 样式详解** 在Web开发中,Google Maps API V3是一个强大的工具,它允许开发者在网页上嵌入交互式的地图,并进行高度自定义。本篇将深入探讨如何利用Google Maps API V3来创建和管理地图的样式,以...
综上所述,"Google Map v3 官方实例"中的内容涵盖了地图集成、交互设计、地理信息处理等多个方面,对于任何希望在网站或应用中集成地图功能的开发者而言,都是极其宝贵的参考资料。通过学习和实践这些实例,开发者...
根据经纬度转换成详细地址。由于google map v2 已申请不了key 了, 更换成v3, 代码也需要更换成v3代码。2013-10-30上传。
首先,`googleMap根据经纬度获取地理位置`这个标题涉及到的核心技术是Google Maps Geocoding服务。Geocoding是将地址或坐标(经纬度)转换为地理坐标的过程,反之亦然。在Google Maps API中,我们可以使用Geocoding ...
在本文中,我们将深入探讨Google Maps API的第三版(V3),主要关注V3地图搜索、地图标注以及多点标注的实现。Google Maps API V3是Google提供的一个强大的JavaScript库,用于在网页上嵌入交互式地图,进行地理位置...
Google Map API V3(3.9.12)是谷歌提供的一个用于在网页上嵌入交互式地图的服务,它是Google Maps JavaScript API的第三个主要版本。这个离线开发包允许开发者在没有网络连接的情况下进行地图应用的开发和测试,这...
谷歌地图API V3是一个强大的工具,用于在网页上集成交互式地图功能。在这个案例中,我们将探讨如何使用PHP和MySQL数据库与谷歌地图V3 API进行动态交互,实现用户点击地图后添加标记,并将这些标记信息存储到数据库中...
《手机地图应用:GoogleMap(For S60第三版)深度解析》 手机地图作为现代生活中不可或缺的一部分,为我们的出行提供了极大的便利。GoogleMap作为全球知名的在线地图服务,其手机版在移动设备上同样表现出色,尤其...
本文将深入探讨GoogleMap谷歌地图API的使用,以及如何通过它实现一个全面的地图工具。 首先,让我们从标题"GoogleMap谷歌地图demo"开始。这个标题暗示我们将会讨论一个基于GoogleMap API开发的示例应用。一个demo...