我不确定我想要实现的目标是可能的,但我知道这里有一些富有创造力的人,不可否认,我需要一些手握这个.
自动生成/填充多边形内的形状.为了我的目的,我不需要盒子,我需要一个缠绕路径来填充每个用户创建的多边形.我需要那条蜿蜒的路径来拥抱多边形的边界,如上图所示. 在多边形内绘制小方框
这是我试图将此功能应用于的代码:
//debugger;
/////////////////////////////////////////////////////////////
//Map Specifications
function initialize() {
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 18,
center: new google.maps.LatLng(33.27144940863937, -117.2983479390361),
mapTypeId: google.maps.MapTypeId.SATELLITE,
mapTypeId: google.maps.MapTypeId.HYBRID,
tilt: 0,
disableDefaultUI: true,
zoomControl: true,
mapTypeControl: false,
scaleControl: true,
streetViewControl: true,
rotateControl: true,
fullscreenControl: false
});
// Creates a drawing manager attached to the map that allows the user to draw
// markers, lines, and shapes.
drawingManager = new google.maps.drawing.DrawingManager({
drawingControlOptions: {
position: google.maps.ControlPosition.TOP_CENTER,
drawingModes: [
google.maps.drawing.OverlayType.POLYLINE,
google.maps.drawing.OverlayType.POLYGON
]
},
markerOptions: …Run Code Online (Sandbox Code Playgroud)我有一个像这样的字符串"f_details(\'277095\');">。我只需要得到这个277095部分。我一直在尝试 的变体strPattern = "\'[0-9]\'+",但这要么什么也没找到,要么找到错误的东西。
尽管我面前有一张备忘单,但我不懂正则表达式。已经花了一个小时尝试不同的事情。这个正则表达式会是什么样子?
\n\n这是我用来抓取该网站并获取数据的代码:
\n\nSet objWshShell = Wscript.CreateObject("Wscript.Shell")\nSet IE = CreateObject("internetexplorer.application")\nSet fso = CreateObject("Scripting.FileSystemObject")\n\non error resume next\nFor i=1 To 77 \'77 Counties\n\nIf i=77 Then Exit For\n\nIE.Visible = True\nIE.Navigate "https://lic.ok.gov/PublicPortal/OREC/FindAssociateEntity.jsp"\nDo Until IE.ReadyState = 4: WScript.sleep 15: Loop\n\nDo Until IE.Document.ReadyState = "complete": WScript.sleep 10: Loop\nIE.Document.getElementsByTagName("select")("AddrCountyCode").Value = i\n\nDo Until IE.Document.ReadyState = "complete": WScript.sleep 10: Loop\nFor Each btn In IE.Document.getElementsByTagName("input")\nIf btn.name = "btnSearch" Then btn.Click()\nNEXT\n\nstrPattern = "\'(\\d+)\'"\n\nstrTestString = ie.document.body.innerhtml\n\narrAllMatches = fGetMatches(strPattern, strTestString)\n\nIf UBound(arrAllMatches) …Run Code Online (Sandbox Code Playgroud)