geolocation

PostgreSQL: ST_GeomFromText(unknown) does not exist

心已入冬 提交于 2020-01-14 18:45:09
问题 Here is the problem, I just installed PostgreSQL right now and try to build a geoloc database. For this, i installed the PostGIS extension and PostGIS_Topology. In my pgAdmin UI, i can see my model, my schema is "Geo" and I can see below, in the functions list, the postGis functions that are available (about 1000, see screenshot) Problem is, when I try to insert a new record in the database, Example: INSERT INTO "Geo".points(point, lat, lng) VALUES (ST_GeomFromText('POINT(42.555 32.222)'),'42

HTML5 geolocation won't work in Firefox, Chrome and Chromium

☆樱花仙子☆ 提交于 2020-01-14 17:53:47
问题 I'm trying to use the HTML5 geolocation API; but I have problems to make it work on Firefox Chrome and Chromium : init(); function init() {; // Get the current location getPosition(); } function getPosition() { navigator.geolocation.getCurrentPosition(success, fail,{ enableHighAccuracy:true, timeout:10000, maximumAge:Infinity }); } function success(position) { alert("Your latitude: " + position.coords.latitude + "longitude: " + position.coords.longitude); } function fail(e) { alert("Your

when a user reject the geolocation service, do i get the reject event?

巧了我就是萌 提交于 2020-01-14 10:11:37
问题 I mean, if i have a button on the web page, when a user click the button, then can get the user's geolocation information. but before, the browser will ask the user whether accept to use the geolocation service. if the user reject the geolocation service, can i get the reject event? 回答1: Yes. Example: navigator.geolocation.getCurrentPosition(successCallback, errorCallback); function successCallback(){ alert('Thanks for allowing geolocation!'); } function errorCallback(){ alert('You denied us

Leaflet geofence on multiple circles … detecting marker inside / outside

余生颓废 提交于 2020-01-14 05:51:06
问题 I have some code that detects when the market is dragged inside and outside of a circle. This works great but I was just wondering how I can have one market and multiple circles detected instead of just one. Here is the current code: var mymap = L.map('mapid', { center: [50.895763, -1.150556], zoom: 16 }); L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1Ijoic3RldmVuc2F0Y2giLCJhIjoiY2p5eDR6MWgzMHRvbjNocnJkN2d2MjRwaSJ9.wd0OtBUQQfUtNxdduQA3lg', { maxZoom: 18

Using Elastic Search Geo Functionality To Find Most Common Locations?

╄→尐↘猪︶ㄣ 提交于 2020-01-14 04:54:05
问题 I have a geojson file containing a list of locations each with a longitude, latitude and timestamp. Note the longitudes and latitudes are multiplied by 10000000. { "locations" : [ { "timestampMs" : "1461820561530", "latitudeE7" : -378107308, "longitudeE7" : 1449654070, "accuracy" : 35, "junk_i_want_to_save_but_ignore" : [ { .. } ] }, { "timestampMs" : "1461820455813", "latitudeE7" : -378107279, "longitudeE7" : 1449673809, "accuracy" : 33 }, { "timestampMs" : "1461820281089", "latitudeE7" :

Tag huge list of elements with lat/long with large list of geolocation data

夙愿已清 提交于 2020-01-13 20:46:34
问题 I have a huge list of geolocation events: Event (1 billion) ------ id datetime lat long And a list of point of interest loaded from open street map: POI (1 million) ------ id tag (shop, restaurant, etc.) lat long I would like to assign to each to each event the tag of the point of interest. What is the best architecture to achieve this problem? We tried using Google BigQuery but we have to do a cross join and it does not work. We are open to use any other big data system. 回答1: Using Dataflow

Add inline CSS except for a specific country in Woocommerce

£可爱£侵袭症+ 提交于 2020-01-13 19:52:34
问题 I would like to add css style in my woocommerce website if country is not France because i need to hide a button in all countries except France. I tried the code below add_filter( 'woocommerce_state_FR' , 'custom_css_countries', 10, 1 ); function custom_css_countries($mycss) { $country = array('FR'); if( ! in_array( $country ) ){ echo '<style>#payez-sur-12-mois{display:none;}</style>'; } return $mycss; } 回答1: You don't really need to use WC_Geolocation class for this. Instead you can use WC

Transforming GPS coordinates for OpenLayers

纵饮孤独 提交于 2020-01-13 19:29:30
问题 I am building a project in JavaScript that uses OpenLayers with an OpenStreetMap layer. I have the coordinates "48.3185005, 14.2853003" (the coordinated of Linz, Austria) which I get from either navigator.geolocation.getCurrentPosition() or the Google Maps Geocoding API. Now I want to show this point on the map. Which transformations are necessary for the map to display the correct location and how do I do these transformations with OpenLayers? At the moment, I am always getting some point

How to programmatically find geo location of incoming http request? [closed]

ε祈祈猫儿з 提交于 2020-01-13 11:52:57
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 11 months ago . I know there are many online tool available but I want to write in house tool, references or how to go about it? Or even it can be done or is a mammoth task? 回答1: You need to have a location database of all IP addresses. So, either you build a database yourself (a genuinely mammouth task) or you use an

How to programmatically find geo location of incoming http request? [closed]

為{幸葍}努か 提交于 2020-01-13 11:52:02
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 11 months ago . I know there are many online tool available but I want to write in house tool, references or how to go about it? Or even it can be done or is a mammoth task? 回答1: You need to have a location database of all IP addresses. So, either you build a database yourself (a genuinely mammouth task) or you use an