UI development best practices, front-end programming tips and news to speed up your Web development.

Follow us:

Write for us: learn about our guest posts guidelines.

Integration with Online Geographical Maps

A possibility to add a location search mechanism to web pages is a frequently requested feature. Webix Library offers a simple and elegant solution for embedding online geographical maps into the web application.

This article will tell you how to add popular web maps such as Google, Nokia, OpenStreet and Yandex maps into a Webix app with just several lines of code.

Building Map View

Firstly, you should download the wrapper for the needed map from Webix open repository of helpers that connect your app to third-party applications without linking to them directly. Note that these extensions are not included into the default library package.

Secondly, once you’ve downloaded the necessary code file, you should include a link to it to the head section of your document. For instance, to embed Google Map you link to:

<script type="text/javascript" src="./googlemap.js"></script>


HTML Layouts with Webix

Where it may be useful

HTML5 provides multiple ways of arranging elements on the page. However, while building web apps we can still face tasks that can’t be solved with pure HTML and CSS. For example, there’s a problem of mixing percent and fixed size values in the same row. Another task that exercises the developers’ minds is making columns of equal height. The CSS Grid specification looks like a promising solution to such problems, but it’s currently at the draft stage and implemented only in Internet Explorer. If you need to have a greater layout flexibility here and now – that is where Webix Layouts can help.

Cross Domain Data Loading with Webix

What the purpose is

Modern web apps can be rather complicated. It’s not uncommon that a single page can consume data from multiple sources, part of which can be provided by third party API or by a related application that resides on some other site. And that is where a problem occurs. A page hosted on one domain can’t access data from a different domain.

For example, if you have a page hosted on //app.mydomain.com, which tries to load data from the //data.mydomain.com, the data loading will fail. Any browser blocks such kind of data loading operation for safety reasons. Moreover, a request to a different port, such as //app.mydomain.com:5000 for example, will be blocked as well. URLs pointing to the same domain but to different ports are treated as URLs pointing to different domains.

1 32 33 34 35 36 37