首页 \ 问答 \ Google Maps API v3 UNIQUE标记JS(Google Maps API v3 UNIQUE marker JS)

Google Maps API v3 UNIQUE标记JS(Google Maps API v3 UNIQUE marker JS)

我试图在一个简单的JavaScript Web API上有一个独特的标记,没有jQuery。

每当我点击地图时,我首先尝试删除上一个标记

marker.setMap(null);

在创建新的之前,它会阻止新的,屏幕上没有任何内容。

我可以使用按钮或其他事件轻松删除标记,但有没有办法自动执行,并且在地图上只有一个标记(可拖动:true可以移动它,也许dblClick可以删除它)?

标记创建由平常触发

google.maps.event.addListener(map, "click", function(event) {...

var marker = new google.maps.Marker({...

该界面用于定义单个位置,因此我不希望屏幕上有多个标记; 然后将坐标保存在数据库中。


I'm trying to have a unique marker on a simple javascript web API, no jQuery.

I first tried to delete the previous marker every time I click on the map, with

marker.setMap(null);

just before creating the new one, but it blocks the new one, nothing appears on the screen.

I can easily delete the markers with a button or other event, but is there a way to do it automatically, and have only one marker on the map (with draggable: true to move it, maybe dblClick to delete it) ?

Marker creation triggered by usual

google.maps.event.addListener(map, "click", function(event) {...

var marker = new google.maps.Marker({...

The interface is used to define a single location so I don't want more than one marker on the screen; coordinates are then saved in a database.


原文:https://stackoverflow.com/questions/28261525
更新时间:2022-05-07 10:05

最满意答案

DeploymentServerType参数是可选的( MSDN ),如果指定,它会限制您的解决方案部署到的服务器场中的哪些服务器。 如果您同时拥有App Server和Web前端组件,则只需将参数保留,以便将其部署到所有服务器。

请参阅以下博客文章中的“解决方案元素”部分:

http://blogit.create.pt/blogs/andrevala/archive/2008/02/17/sharepoint-2007-deployment_3a00_-creating-solutions.aspx

“DeploymentServerType - 指示部署此解决方案的目标服务器类型。可以是ApplicationServer或WebFrontEnd。此属性是可选的(如果未使用,则将解决方案部署到服务器场中的所有服务器)”

编辑:从逻辑上讲,如果您的解决方案只包含WFE内容(Web部件,页面,图像等..),那么您可以使用WebFrontEnd参数。 如果它包含AppServer内容(计时器作业或部署到管理中心的任何内容 - 例如,额外的管理页面),则使用ApplicationServer参数。 通常我发现大多数解决方案都将部署到WebFrontEnd。


The DeploymentServerType paramater is optional (MSDN), if specified it restricts which servers on the farm your solution gets deployed to. If you have both App Server & Web Frontend components then just leave the parameter out so it gets deployed to ALL servers.

See the section "Solution Element" on the following blog article:

http://blogit.create.pt/blogs/andrevala/archive/2008/02/17/sharepoint-2007-deployment_3a00_-creating-solutions.aspx

"DeploymentServerType - Indicates which type of server is the target for the deployment of this solution. Can be ApplicationServer or WebFrontEnd. This attribute is optional (if not used, the solution is deployed to all the servers in the farm)"

EDIT: Thus logically if your solution just contains WFE content (Web parts, Pages, Images etc..) then you can use the WebFrontEnd parameter. If it contains AppServer content (Timer Jobs or anything deployed to Central Administration - eg. an extra administration page) then use the ApplicationServer parameter. Generally I find most solutions will be deployed to the WebFrontEnd.

相关问答

更多
  • Raphyboy, 内容部署是一个MOSS专用功能; 它不存在于WSS中。 PRIME API(其中构建了MOSS的内容部署功能)存在于WSS平台中,因此您可以构建自己的版本...但这种方法很少更有效或更经济。 正如Chris所暗示的那样,您仍然可以通过命令行执行基本导出( STSADM -o导出 )和导入( STSADM -o导入 )操作,并且这些功能与MOSS内容部署路径和作业中存在的功能相同。 这显然是更多的手工(和更多的工作),但是如果需要,你可以将这些操作编写为穷人的内容部署系统。 我希望这有帮助 ...
  • 好吧,我现在已经发现了我的问题的解决方案! 此问题是由于将“匿名访问”设置为“网站设置”中的“整个网站” - >“设置” - >“匿名访问”下的“高级权限”,并通过管理中心关闭“无人访问” - >“应用程序管理” - >“身份验证提供程序”(默认) - >编辑身份验证。 这允许AD中的任何用户登录具有读取权限的站点并查看所有内容! 无论WSS是在域控制器上还是在不同的盒子上。 因此,要解决此问题,我必须通过中央管理员打开匿名访问,以便我可以在网站设置 - >网站权限中实际看到匿名访问菜单选项。 然后我进入菜 ...
  • 根据您的Web部件使用的确切功能和功能,它可能无需更改即可运行。 看看我写的关于将2007年解决方案移植到2010年的这一系列文章 。 Depending on the exact functionality and features used by your web part, it may work without change. Have a look at this series of articles that I wrote about porting a 2007 solution to 20 ...
  • 为了将来的参考,我发现我们的系统设置方式是错误的,为了纠正这个问题我们: 备份所有数据库。 从服务器中删除了WSS。 使用高级配置在服务器上重新安装WSS以指定SQL服务器而不是使用本地嵌入式服务器。 最后,使用stsadm -o addcontentdatabase将内容数据库重新附加到WSS的新实例。 For future reference I discovered that the way that our system has been set up is wrong, to rectify th ...
  • DeploymentServerType参数是可选的( MSDN ),如果指定,它会限制您的解决方案部署到的服务器场中的哪些服务器。 如果您同时拥有App Server和Web前端组件,则只需将参数保留,以便将其部署到所有服务器。 请参阅以下博客文章中的“解决方案元素”部分: http://blogit.create.pt/blogs/andrevala/archive/2008/02/17/sharepoint-2007-deployment_3a00_-creating-solutions.aspx “ ...
  • 已解决 - 我发现了一个小错误 - 文件是在正确的位置创建的,但更新路径是错误的...我最终找到了一个文件夹,其中包含许多新版本的文件.. doh! SOLVED -- I found a little bug - the file was being created in the right place, but the update path was wrong.. I ended up finding a folder full of files with many, many new version ...
  • 可以从对象模型中配置站点,但创建完全自定义的站点超出了单个问题的范围。 为了帮助您入门,您应该查看SPWebCollection.Add以及SPSiteCollection.Add 。 要在您的某个Web应用程序中创建网站集和某些子网站,您可以使用以下内容: var farm = SPFarm.Local; var solution = farm.Solutions.GetValue("YourSolution.wsp"); var application = solution.De ...
  • 我将假设您处于可以向页面添加其他Web部件而不是尝试直接将JavaScript添加到DataView Web部件的情况。 如果Designer添加了此列表的另一个视图,我的建议将无法在单独的页面上工作。 将空白.js文件上传到您的站点资产。 将内容编辑器Web部件添加到页面,将其指向该文件。 从提供程序添加JQuery或自己托管它,在文件中添加引用。 从那里,您有3个方向可以工作:首先,使用Internet Explorer的F12开发人员工具探索Web部件,特别注意具有良好的唯一ID,名称或类的div和表 ...
  • 我想我理解你的问题,尽管我还是有点朦胧。 如果我不符合标准,我提前致歉。 你可以简单地关闭结果显示列表和库,你不想在结果中显示。 如果您转到任何列表或库的高级设置 ,最后一个单选按钮设置用于搜索 (例如,“允许此列表中的项目出现在搜索结果中?”)。 将其设置为“ 否”会从搜索结果中删除列表/库内容。 除此之外,您配置WSS搜索的选项非常有限。 与全面的OSS搜索引擎不同,微软的“黑盒子”WSS适用于固定范围,爬行计划等。 I think I understand your question, though ...
  • 经过大约4天的搜索,我发现了一条线索。 线索是更改SharePoint的中央管理员中的身份验证,以允许除Windows身份验证模式之外的匿名。 一旦做出改变,似乎可能是修复。 响应时间从30-60秒变为1-4。 它不是100%,但它允许我们以更快的速度继续发展。 我希望这可以帮助面临同样问题的人。 这是一场噩梦。 我没有头发了。 更新:这不是100%修复。 After about 4 days of searching I came across a clue. The clue was to change ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)