Hi ThinkGeo,
I am using mousedown, mouseover and mouseup events in JavaScripts on Map. How to ensure that gets mapped to Touch events on IPAD on in web browser (Safari)?
I do usetrue;
Regards,
Anil
MapTools.TouchMapTool.Enabled =
Hi ThinkGeo,
I am using mousedown, mouseover and mouseup events in JavaScripts on Map. How to ensure that gets mapped to Touch events on IPAD on in web browser (Safari)?
I do usetrue;
Regards,
Anil
MapTools.TouchMapTool.Enabled =
Hi ThinkGeo,
Please note in my application, TouchMapTool on the Web Map object is Enabled to true.
For InMemoryFerature Layers I register "click" event on the mapusing JavaScript and invoke AJAX server callback to get results to show in the popup.
Regards,
Anil
Hello Anil,
Thanks for your question on this subject. Currently our WebEdition5.0 supports some “touch” events (drag-pan on iOS and Android, pinch-zoom on iOS, double-tap to zoom on iOS and Android). In order to use these features there’s no code changes required on your side. The map will determine which OS/browser is accessing the map and behave accordingly.
We’re currently updating the WebEdition to support all “touch” events. We’re working to make sure all functionality that currently works on a desktop browser also work on a mobile browser’s touch interface.
Please let me know if you have any other questions.
Thanks,
Gary
Hi Gary,
What timeline to support it? I am using 5.0.115.
Currently it seems none of the events (registered via JavaScript) like click, mousedown, mousehover, mouseuip is working on IPAD.
Regards,
Anil
Anil,
We have plans on this but don't have a timeline shortly. We aren't support mousedown, mousehover, mouseup events for now, and i think the server side protected void Map1_Click(object sender, MapClickedEventArgs e) does not work on the iPad.
But we have a workaround for the "Click" for now, please use the code below in the aspx.cs: map.OnClientClick = "mapClicked";
and this in JavaScript:
function mapClicked(e) {
var location;
if (e.xy != null) {
location = map.getLonLatFromPixel(new OpenLayers.Pixel(e.xy.x, e.xy.y));
} else {
location = map.getLonLatFromPixel(new OpenLayers.Pixel(e.offsetX, e.offsetY));
}
if (InfoToolActive() == true) {
handleMapClickedAjax('MapClicked:', location);
}
else if (PostCodeSelectActive() == true) {
handlePostCodeSectorSelect('PostCodeSectorSelect:', "POINT (" + location.lon + " " + location.lat + ")");
}
}
I hope this can help, any more questions just let us know.
Regards,
Gary
Anil,
Actually, the JavaScript used on IPAD, such as “mousedown”, “mousemove” and “mouseup” , behave a bit different from in the desktop browsers. Please use the “OpenLayers.Handler.Click” and “OpenLayers.Hanlder.Drag” classes wrapped by the OpenLayers, which includes the IPAD events “touchstart”, “touchmove”,”touchent” to support the touch events.
Thanks,
-Johnny