This is a migrated thread and some comments may be shown as answers.

Kendo UI mobile and Leaflet

5 Answers 251 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Noli
Top achievements
Rank 1
Noli asked on 19 Apr 2012, 05:28 AM
Hi,

Would it be possible to have a demo of Leaflet for Kendo UI mobile?

http://leaflet.cloudmade.com/examples/mobile.html

I suggest, the first page is listview and second page is the Leaflet map.

Thanks.


5 Answers, 1 is accepted

Sort by
0
Noli
Top achievements
Rank 1
answered on 19 Apr 2012, 05:35 AM

Oops...

It seems there was a problem with our server.

If the problem persists, use the Site Feedback form to tell us what steps led you to this page.

I could not edit my previous post.

Here's the idea.

    <div data-role="view" data-title="Destinations">
    <ul data-role="listview" data-style="inset" data-type="group">
        <li>
            Africa
            <ul>
                <li data-icon="toprated"><a>Nairobi</a></li>
                <li data-icon="toprated"><a>Nairobi Map</a></li>
</ul> </li>


Nairobi Map is Leaflet Map.



0
Petyo
Telerik team
answered on 19 Apr 2012, 06:11 AM
Hi,

From what I see, the two libraries should work without any glitches. Just make sure that you initialize the map in the init event of the respective view. 

Regards,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Noli
Top achievements
Rank 1
answered on 19 Apr 2012, 06:26 AM
Show us a bit of code.

Which one of Kendo UI to use, on the second page?

http://demos.kendoui.com/beta/mobile/button/index.html

In jQTouch, we have this code:

<div id="map" class="keep_tabbar">
            <div class="toolbar">
                <h1>Leaflet Map</h1>
               </div>

         <div id="map-container" class="notransform">
                <div id="map-overflow" style="overflow: hidden; padding: 0; border: 0;" class="notransform">
                    <div id="map_canvas" style="margin-left: 1px; margin-top: 1px;" class="notransform"></div>
                </div>
            </div>
</div>

Now, how do you translate this into Kendo UI?

<body>
   
<div data-role="view">
     
<div data-role="header">Header</div>

    <article data-role="content" style="margin: 0; padding: 0">
        <div id="map_canvas"></div>
      </article>

 

     
<div data-role="footer">Footer</div>

   
</div>

What is javascript to make this working?

Here is Leaflet mobile example
http://leaflet.cloudmade.com/examples/mobile-example.html

Jquery mobile Leaflet example
http://stuff.samat.org/Demos/jQuery-Mobile/jQM-Leaflet-Demo/demo.html
0
Jose Mejia
Top achievements
Rank 1
answered on 19 Apr 2013, 09:36 AM
Hello,

Leaflet don't working with Kendo UI Mobile.
I try to use Leaflet, but "pan" and "zoom" events don't working at Android or iPad. Working fine in all browsers at desktop.
I tried Openlayers, it works fine.
Please look at simple standalone example in archive.
Also similar issue closed at leaflet's github https://github.com/Leaflet/Leaflet/issues/1043
Is there any workaround for this problem?

Regards
0
Petyo
Telerik team
answered on 19 Apr 2013, 11:19 AM
Hi Jose,

I updated the provided example to our 2013 Q1 release (2013.1.319), and enabled the stretch property of the view which contains the map - the example ran fine on my side. Please give that a try:

<div id="view_map" data-role="view" data-title="Map" data-init="map_init" data-stretch="true">

Regards,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Noli
Top achievements
Rank 1
Answers by
Noli
Top achievements
Rank 1
Petyo
Telerik team
Jose Mejia
Top achievements
Rank 1
Share this question
or