mobile

google maps js api blocks ui when adding markers

生来就可爱ヽ(ⅴ<●) 提交于 2020-05-16 22:41:06
问题 I have a problem with google maps on mobile browsers. The project I'm working on requires about 500 markers to be shown on a map, but when adding them, the ui freezes. I'm using markerclusterer to add markers, and performance is fine once the markers are on the page. Is there a way to add the markers asynchronously, or to pause adding markers once the user starts scrolling? This is the code we're using: var mcOptions = { gridSize: 50, maxZoom: 15, zoomOnClick: false }; var mc = new

How to completely remove mobile browser long-press vibration?

为君一笑 提交于 2020-05-11 06:17:28
问题 I'm trying to completely remove the vibration that occurs on a long press of an element in a mobile browser. Specifically, I have an image that I'm adding my own long-press functionality to, but the subtle short-vibrate that happens by default is interfering and I need to disable it. I've successfully stopped the usual context menu from appearing by overriding it as follows: window.oncontextmenu = function (event) { event.preventDefault(); event.stopPropagation(); return false; }; I've also

How to improve image segmentation using the watershed?

大憨熊 提交于 2020-05-02 11:16:22
问题 The bounty expires in 5 days . Answers to this question are eligible for a +100 reputation bounty. Carlos Diego is looking for a canonical answer . I am developing an application to detect the lesion area, for this I am using the grabcut to detect the ROI and remove the background from the image. However in some images it is not working well. He ends up not identifying the borders of the region of interest well. The watershed can better identify the edges for this type of work, however I am

How can I make canvas drawing work on mobile

笑着哭i 提交于 2020-04-10 04:47:28
问题 My canvas drawing interface works perfectly on desktop but fails to work on iPhone. When I try to draw, it just makes a dot where my thumb goes. When I drag my thumb, there is no line and the page continues to scroll... Code: var clearButton = document.getElementById('doodle-bin'); var canvascontainer = document.getElementById('doodle-canvas-container'); var canvas = document.getElementById('doodle-canvas'); var context = canvas.getContext('2d'); var radius = (document.getElementById('doodle

How can I make canvas drawing work on mobile

≡放荡痞女 提交于 2020-04-10 04:47:11
问题 My canvas drawing interface works perfectly on desktop but fails to work on iPhone. When I try to draw, it just makes a dot where my thumb goes. When I drag my thumb, there is no line and the page continues to scroll... Code: var clearButton = document.getElementById('doodle-bin'); var canvascontainer = document.getElementById('doodle-canvas-container'); var canvas = document.getElementById('doodle-canvas'); var context = canvas.getContext('2d'); var radius = (document.getElementById('doodle

jquery mobile 的content中图片居中

爷,独闯天下 提交于 2020-03-26 10:26:31
<!DOCTYPE html> <html> <head> <title>helloKitty</title> <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1" /> <link rel="stylesheet" href="../lib/jquery.mobile-1.1.0.css" /> <script type="text/javascript" src="../lib/jquery-1.7.1.js"></script> <script type="text/javascript" src="../lib/jquery.mobile-1.1.0.js"></script> <style type="text/css"> div .test { position: absolute; top: 50%; left: 50%; margin: -5.8em 0 0 -4.4em; width: 11.6em; height: 8.8em; } </style> </head> <body> <div data-role="page"> <div data-role="header"> <h1>header</h1> </div> <div data-role

Locking down a REST API to one app. How?

别来无恙 提交于 2020-03-25 17:11:34
问题 I have a small one page browser based app which consumes a REST API. Users are authenticated via a shortish lived token based system. I'm likely going to expand this to also include mobile apps (either native or hybrid) which will also consume the same API. I do have one concern though - how can I 'lock' my API so that only my apps can consume it? In other words, how can I stop someone else building an app that uses my API? 回答1: You need some sort of authentication, and if you're going to do

VueJS click doesn't work on mobile, click listener is not detected

◇◆丶佛笑我妖孽 提交于 2020-03-23 08:19:14
问题 I'm trying to figure out where the problem is with VueJS on click listener. So here i have a list of possible language that a user can choose from: EN FR IT this list is wrapped into a <div> that shows or hide the list by using a click listener, the problem is that it only works on desktop and not on mobile Here some video i captured to show you where is the problem Desktop (here is working as expected) Mobile (here is not working anymore) And here there is the code i'm now using for the

VueJS click doesn't work on mobile, click listener is not detected

|▌冷眼眸甩不掉的悲伤 提交于 2020-03-23 08:19:12
问题 I'm trying to figure out where the problem is with VueJS on click listener. So here i have a list of possible language that a user can choose from: EN FR IT this list is wrapped into a <div> that shows or hide the list by using a click listener, the problem is that it only works on desktop and not on mobile Here some video i captured to show you where is the problem Desktop (here is working as expected) Mobile (here is not working anymore) And here there is the code i'm now using for the

vue 阿里云发送短信Api

主宰稳场 提交于 2020-03-22 16:54:12
const Core = require("@alicloud/pop-core"); var client = new Core({ accessKeyId: "xxxxxx", accessKeySecret: "xxxxxxx", endpoint: "https://dysmsapi.aliyuncs.com", apiVersion: "2017-05-25" }); var params = { RegionId: "cn-hangzhou", PhoneNumbers: mobile, SignName: "十面埋伏", // 签名名称 公司名 TemplateCode: "xxxxx", // --短信模板id TemplateParam: "{'code':'aaaaa'}" }; var requestOption = { method: "POST" }; await client.request("SendSms", params, requestOption).then( result => { if (result.Code == "OK") { this.info.result = true; this.info.msg = "发送成功"; } //this.ctx.body = JSON.stringify(result); // console