‘HTML5 geolocation’ címkét tartalmazó cikkek
Update1: Az első példánál, normális, ha üres képernyőt kapsz, azt jelenti, minden rendben. A második példánál, adjatok időt az oldalnak, működik, csak lassan. Még nem jöttem rá mi okozza a lassulást. A harmadik példa a google maps-től függően gyors vagy lassú.
Mi is az a Geolokáció? Nos, a HTML5 hozománya, a GeoLocation modul segítségével visszakaphatjuk a weboldalt megjelenítő eszköz (számítógép, tablet, mobil, stb.) földrajzi pozícióját. Ezt továbbküldhetjük akár a Google Maps-re. A dolog szépséghibája csupán annyi, hogy nincs meghatározva, hogy mivel határozzuk meg ezt a helyzetet. Az eszközbe épített GPS-el, cellainformációk alapján, IP cím alapján, stb. Amennyiben, a technikai specifikáció a végleges változatban kicsit konkrétabban meghatározza ezt, akkor valóban nagyon hasznos és gyors elterjedésű eszközt kapunk készhez. Addig is érdemes vele, mint érdekességgel foglalkozni. Sajnos egyenlőre tapasztalataim alapján ha nincs GPS modul az eszközben, akkor nagyjából 35-50km pontossággal tudja a helyzetünket meghatározni, de tapasztaltam 200km-es eltéréseket is. Akkor kezdjünk is bele.
A böngésző ellenőrzése
Nézzük meg elsőnek, hogy hogyan tudjuk ellenőrizni, hogy böngészőnk támogatja-e ezt az új eszközt. Az alábbi kód semmi mást nem csinál, mint lekérdezi, hogy a böngészőnk képes-e a geolokációra, amennyiben nem, akkor azt egy hibajelzéssel tudatja velünk, ha képes rá akkor egy üres képernyőt kapunk. Tovább olvasom »
Hungarian geolocation tutorial
What realy Geolocation is? The Geolocation modul of HTML5 returns the geographical position of device (computer, tablet, mobil etc.) that displays the webpage. We can send this to Google Maps. The only flaw is that it is not defined what helps to determine this location. (built-in GPS, based by cell informations or by IP Address etc.) If the Technical Specification in the final version is going to determine this a little bit specifically then we are going to get a very useful and fast spread tool in our hands.
Until that it is worthwhile to deal with this as curiosity. Unfortunately if there is no GPS modul in the device it can be locate our position approximately with 35-50km accuracy based by my experience. But I have got 200km deviation too. Let’s start then.
Checking the browser.
First of all we are going to check that whether our browser supports the new device or not. The code below only queries that our browser capable to use geolocation or not. If not then it returns an error signal. If it is capable then returns a blank screen. Tovább olvasom »
Hungarian Geolocation introduction
Update1
The working source can be available here. What is My IP? I put this up here because many of you seek.
Before we start the geolocation let me make a little retrospection. In this article we are going to see how we queried the data of browsers and users in the past. Our best assistance was the “user agent”.
The user agent acts as a client in a network protocol used in communications within a client–server distributed computing system.
Most frequently people use this in case of World Wide Web access applications (web browsers, web crawler etc.). The browers forwarding the “user agent” to the web server which describes the client hardware platform, the operating system, the browsers type and version and its language settings.
Browser information Tovább olvasom »