Openlayers 3 map initially only draws on window resize - openlayers-3

I have a popup window that comes up when you click on a map marker. Within the popup window there is a minimap that shows the point that was clicked on, but zoomed in, so a thumbnail of that point on the ground. This minimap is an innerHTML element in the popup window. When I first click on the marker, this map element is blank, but when I resize my browser window the map appears. Also when I click on a different marker, the map will appear if I don't close the popup. The map just does not show up when the popup initially appears unless I resize the browser. Does anyone know what could be the issue? Thanks!

I've had this issue in the past - on window resizes. I tend to trigger a resize to force it when starting.
Try calling map.getMap().updateSize(); after you setup the map in the popup?

Related

How to add an clickable button on top of a MapView in Delphi FireMonkey?

I need to add a clickable button with a custom image on top of the TMapView, is this possible?
ps: even if I leave the TImage on top of the view, the map overlays it, that is, the button appears quickly until the map rendering overlays it...
edit ps2: There is no code for the example, I simply put a TImage on the Form, either as a child of TMapView, or as a child of TForm, when I test it on android, when opening the app the image appears quickly before the map and then when the map starts to appear it overlays the image...
edit ps3: I don't know if a TImage is the correct way to do this, is this any component to leave on top of the map, that keeps showing up, serving as a button? Just like on Google Maps...
You can't show anything on TMapView because of "z-order" problem. I looked for while to find a solution.
See : Delphi object over TMapView

GAMBAS3 - show form on second screen

Does anybody know how to show a specific form from GAMBAS3 in the second monitor? The main frm should open on primaryscreen and the second one on the second screen. i cannot find any solution.
All the physical screens are merged to form a single big virtual screen. So you have to move the window to a position located on your second screen.
For example, if your first screen is 1024x768, and your second screen is the same size, sticked to the right of the first screen, then you do:
MyForm1.Move(1200, 0)
MyForm1.Show
and the form should open on the second screen.

Popup with overlay, popup fill window?

Would like to use a popup(jquery mobile) with content and make it fill the screen. Also with overlay.
Like this, scroll down to bottom, Overlay set to A button.
http://jquerymobile.com/branches/popup-widget/docs/pages/popup/index.html
But I want the popup to fill almost the entire screen. This should act as a new page but be filled with ajax content, I will fix this later...
How can I do this?
jQuery Mobile will not size a popup or dialog larger than needed to contain the rendered content. If you really want to fill the page, go with a new page. Consider transitioning to a new page with a pop transition instead.
http://jquerymobile.com/demos/1.2.0/docs/pages/page-transitions.html
You might also consider a dialog as it obscures the underlying page content
http://jquerymobile.com/demos/1.2.0/docs/pages/dialog/index.html

jQuery mobile popup not appearing in center

I am using jQuery mobile and trying to show jQuery pop on page load. But when the page is loaded popup is not appearing in center, instead popup's TOP LEFT corner is appearing in center.
But as soon as browser window size gets change popup automatically shifts to center (Even if I press F12 for developers tool). And then all frequent calls to $('#popupBasic').popup("open"); make it to appear in center of the screen.
But first time top left corner of the popup box appearing in center.
try this: data-position-to="window".
this is the source
You may try repositioning the popup on pageshow:
$( '#popupLogin' ).popup( 'reposition', 'positionTo: window' );
I reckon what you are experiencing is down to the positioning happening prior the page is fully drawn by the browser. You can overcome this by repositioning the popup like this:
$(document).on('pageshow', '.selector', function(){
$('#popupBasic').popup('reposition', 'positionTo: window');
});
$(document).on("popupafteropen", function() {
$('#popup').popup('reposition', 'positionTo: window');
});
You can use the custom pop up events to reposition it after opening
I was getting the same error. You only want to show the popup after the page has been painted.
Adding your code to listen to the pageshow event instead of the pageinit event will probably fix your problem. It fixed it for me.
This is a very vague question.
A few items you should provide:
What browser are you testing on and what version?
What version of JQM?
Are there any custom CSS interacting with JQM?
As of JQM 1.2, Popup options available:
default: "origin"
Sets the element relative to which the popup will be centered. It has the following values:
"origin" When the popup opens, center over the coordinates passed to the open() call (see methods page).
"window" When the popup opens, center in the window.
jQuery selector When the popup opens, create a jQuery object based on the selector, and center over it. The selector is filtered for elements that are visible with ":visible". If the result is empty, the popup will be centered in the window.
Source
It worked for me when I set the width of popup div manually; try:
$("#popupBasic").css("width","200px");

WebView like in Tweetro

I would like to create an effect like the one that is available in Tweetro. In this program, when I show the timeline and select a tweet that contains an URL, a portion of a WebView appears on the right. When I click on it, the WebView extends on the left and becomes navigable. Then, if I click out of the WebView area, it returns on the right.
How is it possible to achieve this effect in a Windows Store App with C#?
Can you not host the webview and all other controls inside a grid and then change the width of the grid column/web-view as required? You can use animation to smooth out the change to give a slide effect.

Resources