Code Monkey home page Code Monkey logo

Comments (11)

darkBuddha avatar darkBuddha commented on June 21, 2024 1

I will upload a demo on the weekend.

from measuretool-googlemaps-v3.

darkBuddha avatar darkBuddha commented on June 21, 2024 1

I tested it only on Chrome (Android and Desktop) so far, hammer.js say iOS should work: https://hammerjs.github.io/browser-support/

But i just tested it on an iPad and it it's indeed not working. If i get to know why that is i will let you know.

from measuretool-googlemaps-v3.

zhenyanghua avatar zhenyanghua commented on June 21, 2024 1

v1.0.0 now support browser touch events, you will be able to use API start the measure tool with your own implementation of the context menu.

from measuretool-googlemaps-v3.

darkBuddha avatar darkBuddha commented on June 21, 2024

I ended up using this: http://hammerjs.github.io/recognizer-press/

small library (20 kB, 7 kB gzipped), works perfect, easy to integrate.

from measuretool-googlemaps-v3.

darkBuddha avatar darkBuddha commented on June 21, 2024

disabled tooltips and contextMenu, and used it combination with this: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vibrate

good touch experience, intuitive and haptic feedback

from measuretool-googlemaps-v3.

zhenyanghua avatar zhenyanghua commented on June 21, 2024

I am not sure if this tool will support Mobile at this time. In addition to the right-click event, the complication include the dragging and hovering special events substitution for mobile devices as well. Do you have a public accessible live demo that uses this library in combination with other touch libraries that solve your use case? I would love to see it in action. Thanks!

from measuretool-googlemaps-v3.

darkBuddha avatar darkBuddha commented on June 21, 2024

here it is

vibration works only after some user interaction. so move the map a bit, long press, measure, and long press again to get rid of it.

from measuretool-googlemaps-v3.

zhenyanghua avatar zhenyanghua commented on June 21, 2024

from measuretool-googlemaps-v3.

artipixel avatar artipixel commented on June 21, 2024

You can use the API and create some buttons with a simple logic;

subscribing to measuring events and create a var that saves the status:

measureTool.addListener('measure_start', ()=> {
 this.isMeasuring = true;
});
measureTool.addListener('measure_end', ()=> {
 this.isMeasuring = false;
});

Then you can track the status and display accordingly the buttons
Start - measureTool.start();
end -measureTool.end();

API ref - https://github.com/zhenyanghua/MeasureTool-GoogleMaps-V3/blob/master/docs/REFERENCE.md

from measuretool-googlemaps-v3.

lsantobuono avatar lsantobuono commented on June 21, 2024

here it is

vibration works only after some user interaction. so move the map a bit, long press, measure, and long press again to get rid of it.

Hey man, any chance you re-upload this?
Thanks a lot!

from measuretool-googlemaps-v3.

zhenyanghua avatar zhenyanghua commented on June 21, 2024

This library doesn't officially support touch screens.

from measuretool-googlemaps-v3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.