Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touch event dont alert latitude #50

Closed
sarahansen223h opened this issue Jun 14, 2015 · 3 comments
Closed

Touch event dont alert latitude #50

sarahansen223h opened this issue Jun 14, 2015 · 3 comments
Assignees

Comments

@sarahansen223h
Copy link

  • Let say i want to click on the globe and the browser most alert me back the latitude of the place that i have clicked. What i did was this:

earth.on('click', fire);

var fire = function(e) {

alert('You clicked at ' +e.latitude);
};
it worked on the web browser and retuned the latitude, but it did not work on the mobile( iPhone ) browser.

so what i did next was this instead:

earth.on('touchstart', fire);

var fire = function(e) {

alert('You clicked at ' +e.latitude);
};

it works on the mobile browser (iPhone), but the problem it dont return latitude. Instead it alert me with "NULL". I want it to return the latitude when i touch the globe in the mobile browser.

Please fix it

@sarahansen223h sarahansen223h changed the title Phone Browser dont return latitude Touch event dont alert latitude Jun 15, 2015
@klokan
Copy link
Member

klokan commented Jun 15, 2015

This is an open-source project - feel free to fix the source code and provide a patch.
Or do you prefer to support the development time we need to fix it and release update?
Estimate @klokantech is 2 hours: purchased at http://www.maptiler.com/support/one-to-one/

@klokan
Copy link
Member

klokan commented Jun 16, 2015

The work is supported by Miizee.com (to be mentioned in the source code as well)

@pjm4
Copy link

pjm4 commented Aug 6, 2016

FYI - a 'touchend' event does not receive the latlng property populated. As a work-around just save the event.latlng property in a 'touchstart' event and reuse in the 'touchend' event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants