Having a bit of trouble with google-map controls then I noticed, same issue exist here as well. https://www.webcomponents.org/element/GoogleWebComponents/google-map
After doing some further analysis it seems loading google map inside polymer component (polymer 2.x & 3.x) having this problem. Maybe some styles are not passed down correctly?
This is how mine google map looks like inside a polymer 3 component. Something seems wrong with zoom controls and full screen control. Note: I am not using google-map component here. I have a <div> inside my component and attaching the map to it like this this.map = new google.maps.Map(this.$.mapDiv, mapOptions)
Appreciate any help, thanks
You are using Polymer 3. And the component is done in Polymer 2...
Maybe, only maybe, they are not compatible and have some issues.
Did you try the older versions? The preview for v1.2.0 looks okay to me.
Related
I know google-maps component is a polymer 3 component, but it seems to depend on all the Polymer 3 stuff, Polymer project says start with lit-element (polymer 3+), so I want to use lit-element, but want a map on my component. How do I do this?
Background:
If you read the roadmap here - https://www.polymer-project.org/blog/2018-05-02-roadmap-update it says don't start a new project with Polymer 3, instead start with Lit-Element.
It also talks about the future of elements - https://www.polymer-project.org/blog/2017-11-27-future-of-elements.html where they are not doing much with them right now until they rewrite them.
So given this, right now if we are trying to build a component using Lit-Element, how do we incorporate google maps, I cant find a single example anywhere. I tried to use the Polymer Google Map component and it is not compatible and has a bunch of errors.
Take a look at this:
https://github.com/jakelheknight/google-maps-limited
Not much out there but this is probably what you are looking for.
Some time ago I rewrited Polymer Google Map component to use Lit instead. You may take a look: lit-google-map
I'm looking at...
How to implement Close button in MVVMCross WPF application?
I'm trying to create simple WPF app that more or less mimics a droid app and has a back navigation. I'm trying to override CreatePresenter but I can't find it! I've looked in the classes on github but it is not there either.
https://github.com/MvvmCross/MvvmCross/blob/b1cb973062b2eb8149f0934f331c4006bc61fa3c/Cirrious/Cirrious.MvvmCross.Wpf/Platform/MvxWpfSetup.cs
I'm confused. What am I missing here?
The presenter is a constructor parameter - see https://github.com/MvvmCross/MvvmCross/blob/b1cb973062b2eb8149f0934f331c4006bc61fa3c/Cirrious/Cirrious.MvvmCross.Wpf/Platform/MvxWpfSetup.cs#L25
I am working on a project in which I am constructing a graph with several nodes and edges using Polymer and web components. I am using an underlying library which is developed in-house by my company which is not based on web components. This library contains functions for creating nodes, initializing graph etc.I have created a custom element called graph which would interact with the library. Following is the declaration of this element:
<polymer-element name="cmp-graph" attributes="canvas" constructor="CMPGraph">
<template>
<div id="graph_win_placeholder">
<div id="graph_win" class="canvas">
<div id="graph_canvas" class="graph-area">
</div>
</div>
</div>
</template>
</polymer-element>
In my Javascript code of the element, I call a function in the library to initialize the graph. This function call needs a handle to the canvas div (the div with id="graph_canvas"). So I pass this.$.graph_canvas as a parameter while making the function call. But the library throws an exception since it is expecting a native version of the div and instead gets a wrapped one since this.$.graph_canvas corresponds to the wrapped version of the div.
I was experimenting different solutions and passing shadow=native as a parameter in the query string while loading my application worked.
But now the problem is, my application can run only on Chrome, Canary and Opera since other browsers do not have the native support for Shadow DOM. Is there any other way to solve this problem?
Any help will be appreciated.
Thanks.
If there is no architectural issue in your library, as a last resort you can
upwrap node just before usage.
Remember to check if Polyfill is present on page or not, otherwise below code will break on chrome.
if(typeof ShadowDOMPolyFill !== undefined)
{
var unwrappedNode = ShadowDOMPolyFill.unwrap(node);
}
I am using this wrapper someone recommended for my iOS cocos2dx game link. It works when I call the showInterstitial() method, but when I try to use the showMoreApps the dialog appears for a split second and then disappears.
In my AppDelegate::applicationDidFinishLaunching() I do this
ChartboostX::sharedChartboostX()->setAppId("REDACTED");
ChartboostX::sharedChartboostX()->setAppSignature("REDACTED");
ChartboostX::sharedChartboostX()->startSession();
ChartboostX::sharedChartboostX()->cacheMoreApps();
And then when I want to call the showMoreApps I do this
ChartboostX::sharedChartboostX()->showMoreApps();
Have a look at my wrapper for Chartboost. It has been updated to use the latest version of the Chartboost SDK and works perfectly in my cocos2D-x game. I have not finished the android documentation yet but you can probably work it out yourself if you need to. The documentation for iOS is almost finished and quite easy to follow.(FYI the class ADELLE is the chartboost delegate and is an objective C++ class so you can use C++ in it as you normally would mixed in with the objective C. This is the same for AdWrapper.mm)
Check it out and see if it works for you.
https://github.com/Lochlanna/Chartboost-Cocos2D-x
I'm trying to make a google maps style interface for a design project. I've got the drag/drop and zoom functions working, but I also want to make it react to gestures on a trackpad (macbook). I assumed 'listening' to the event.delta of a MouseEvent would do the trick, but somehow it's not working. So what's wrong with my code?
stage.addEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheelEvent);
function onMouseWheelEvent(event:MouseEvent):void {
tafelOrigineel_mc.y += event.delta;
}
I have loaded the flash MouseEvents earlier in the document, so that shouldn't be the problem. After I got this working, I will try to use it on the x-axis too. Is that possible with the MOUSE_WHEEL eventlistener?
Thx in advance
It is a long time problem regarding flash player on MacOS.
MOUSE_WHEEL event won't dispatch on MacOS. Though there are some workarounds involving the use of JavaScript to detect the use of the wheel (over the entire flash content), if it isn't a issue, try checking one of those.
There is a list in this blog post:
http://www.impossibilities.com/v4/2009/03/06/flash-mousewheel-implementations-for-mac-os-x/