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

phonegap google maps with framework7 v2 #2164

Closed
innoflash opened this issue Mar 20, 2018 · 13 comments
Closed

phonegap google maps with framework7 v2 #2164

innoflash opened this issue Mar 20, 2018 · 13 comments

Comments

@innoflash
Copy link

Hi Framework7 developers.

i am having a serious problem working with phonegap google maps with Framework7 esp v2,

I am required to select a div in my HTML to place a map here is what i did:

HTML Code:

    <div class="page-content">
        <div id="map_canvas">
            the map canvas
        </div>
    </div>

CSS Code:

#map_canvas, #journey_canvas, #routeMaps, #settingsmap{
    width: 100%;
    height: 100%;
    background-color: #0f0f0f;
    position: fixed;
   /* z-index: 5500;*/
}

JavaScript:

var div = document.getElementById("map_canvas");
        map = plugin.google.maps.Map.getMap(div, {
            controls: {
                myLocationButton: true
            },
            gestures: {
                'scroll': true,
                'tilt': true,
                'rotate': true,
                'zoom': true
            }
        });

There is more logic to the JS file but on my android device when i open this page i am getting the page overlapping the map.

THE MAP IS RENDERED BUT IS NOT REPLACING THE ORIGINAL HTML
ygn4b 1

And here how it looked in F7 v1
bdsye 1

@wf9a5m75
Copy link
Member

Please share your project files on GitHub

@wf9a5m75
Copy link
Member

Thank you for sharing. Excuse me, but could you tell me how to build your project?

@innoflash
Copy link
Author

innoflash commented Mar 20, 2018 via email

@wf9a5m75
Copy link
Member

I can't login to your app with your provided credential.
capture

@wf9a5m75
Copy link
Member

Thank you for quick helps through e-mails.
I figured out the reason. Because the previous-page covers the current page.

First of all, you need to understand how this plugin displays the map.
This plugin generates the native map view under the browser, and the browser is going to be transparent.

When you open the setting page, the previous page is under the current page in HTML hierarchy.
screen shot 2018-03-20 at 10 40 07 am

However, the map view is NOT html element, the map view is displayed under the previous page.
capture

@wf9a5m75
Copy link
Member

Thus, solution is, you just add a CSS rule.

.page-previous {
    display: none;
}

@wf9a5m75
Copy link
Member

capture2

@innoflash
Copy link
Author

innoflash commented Mar 20, 2018 via email

@innoflash
Copy link
Author

innoflash commented Mar 20, 2018 via email

@innoflash
Copy link
Author

very very solved here, thanks a lot@wf9a5m75, you are the best boss

@wf9a5m75
Copy link
Member

You are welcome.

By the way, I appreciate if you support for this project.
This is not mandatory asking, but I appreciate if you donate some tip in order to continue active project working.

This is $5 donation link at paypal

@innoflash
Copy link
Author

u got it

@wf9a5m75
Copy link
Member

Thank you for supporting the maps plugin project! Enjoy the maps plugin!

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

2 participants