Search Results

Search found 307 results on 13 pages for 'geolocation'.

Page 8/13 | < Previous Page | 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Google maps sometimes does not return a geocoded value for string

    - by XGreen
    Hi Guys, I have the following code: It basically looks into a HTML list and geocodes and markets each item. it does it correctly 8 out of ten but sometimes I get an error I set for show in the console. I can't think of anything. Any thoughts is much appreciated. $(function () { var map = null; var geocoder = null; function initialize() { if (GBrowserIsCompatible()) { // Specifies that the element with the ID map is the container for the map map = new GMap2(document.getElementById("map")); // Sets an initial map positon (which mainly gets ignored after reading the adderesses list) map.setCenter(new GLatLng(37.4419, -122.1419), 13); // Instatiates the google Geocoder class geocoder = new GClientGeocoder(); map.addControl(new GSmallMapControl()); // Sets map zooming controls on the map map.enableScrollWheelZoom(); // Allows the mouse wheel to control the map while on it } } function showAddress(address, linkHTML) { if (geocoder) { geocoder.getLatLng(address, function (point) { if (!point) { console.log('Geocoder did not return a location for ' + address); } else { map.setCenter(point, 8); var marker = new GMarker(point); map.addOverlay(marker); // Assigns the click event to each marker to open its balloon GEvent.addListener(marker, "click", function () { marker.openInfoWindowHtml(linkHTML); }); } } ); } } // end of show address function initialize(); // This iterates through the text of each address and tells the map // to show its location on the map. An internal error is thrown if // the location is not found. $.each($('.addresses li a'), function () { var addressAnchor = $(this); showAddress(addressAnchor.text(), $(this).parent().html()); }); }); which looks into this HTML: <ul class="addresses"> <li><a href="#">Central London</a></li> <li><a href="#">London WC1</a></li> <li><a href="#">London Shoreditch</a></li> <li><a href="#">London EC1</a></li> <li><a href="#">London EC2</a></li> <li><a href="#">London EC3</a></li> <li><a href="#">London EC4</a></li> </ul>

    Read the article

  • Using LocationManager from another class than Main

    - by iphonePom
    Hi, i'm new here, i'm new in iphone development, i'm new in Objective-c and i'm new in engligh speaking, so don't hate me :P I'm creating an application that will use the location manager to display the distance between the own position and the positions of a list of shops, like AroundME. Now, i give the locationManager property to my main class and in the .m of that class, precisely in the viewDidLoad method, i make: [locationManager startUpdatingLocation]. It all works fine, but the problem is: i need to know my position in other classes than the main, but i don't think that is a good idea making [locationManager startUpdatingLocation] every time i need it, is not time overhead? The view of my main class is always below the others, so can i retrieve the updated location in my other classes? In what way? Creating another instance of my main class is not useful, i think, but the locationManager, once started, doesn't stop until my main class is released, isn't true? So i think that it is accessible in some way. Thanks for your attention and sorry for my awful english : )

    Read the article

  • Question about [literally] mapping location based on an IP address.

    - by Andrew
    I've been bored lately and I want to start a new project. I was looking at a website mentioned in a different question (http://www.grapevinegame.com/), and I thought the map and how it plots a point based on someone's IP (I assume) is pretty nifty. I want to do something like that, but I have no idea how it's done. I know you can get latitude and longitude, city and state, and some more with some already-written scripts, but how would you plot those on a map of the world? I've seen it other places, like Google Analytics and such, as well. It seems like a neat thing to be able to do, so I was just wondering how exactly it works. :-p.

    Read the article

  • Database layout for an application with geocoding features using geokit

    - by vooD
    I'm developing a real estate web catalogue and want to geocode every ad using geokit gem. My question is what would be the best database layout from the performance point if i want to make search by country, city of the selected country, administrative area or nearest metro station of the selected city. Available countries, cities, administrative areas and metro sations should be defined by the administrator of catalogue and must be validated by geocoding. I came up with single table: create_table "geo_locations", :force => true do |t| t.integer "geo_location_id" #parent geo location (ex. country is parent geo location of city t.string "country", :null => false #necessary for any geo location t.string "city", #not null for city geo location and it's children t.string "administrative_area" #not null for administrative_area geo location and it's children t.string "thoroughfare_name" #not null for metro station or street name geo location and it's children t.string "premise_number" #house number t.float "lng", :null => false t.float "lat", :null => false t.float "bound_sw_lat", :null => false t.float "bound_sw_lng", :null => false t.float "bound_ne_lat", :null => false t.float "bound_ne_lng", :null => false t.integer "mappable_id" t.string "mappable_type" t.string "type" #country, city, administrative area, metro station or address end Final geo location is address it contains all neccessary information to put marker of the real estate ad on the map. But i'm still stuck on search functionality. Any help would be highly appreciated.

    Read the article

  • Find the closest locations to a given address

    - by xtine
    I have built an application in CakePHP that lists businesses. There are about 2000 entries, and the latitude and longitude coordinates for each business is in the DB. I now am trying to tackle the search function. There will be an input box where the user can put a street address, city, or zipcode, and then I would like it to return the 11 closest businesses as found from the database. How would I go about doing this?

    Read the article

  • Real time location tracking - windows program or browser based?

    - by mawg
    I want to track a few hundred, maybe a few thousand people in real time. Let's say that the hardware aspects are sorted out and I can get the data into a database. Now, I want to get it out and show it, in real-time. Weeeell ... "real-enough" time. Let's say that I want to draw a floorplan of a building and plot everyone every 1 to 5 seconds. (I might want to show only certain "kinds" of people at the click of a button; I will need datamining, etc, but let's stick with the worse case scenario). I am comfortable enough with PHP, though not this sort of thing. I personally would be happier with a windows app coded in Delphi, but the trend seems to be to make everything browser based. So, the question, I guess is whether a browser can handle this and whether there are compelling arguments for a windows-based or browser-based solution. If browser-based can handle this (displaying a few thousand data-points a second), and there are no overwhelming arguments for windows then I guess I will go for browser-based and learn a few new tricks. The obvious advantage being that I could also re-use a large part of my code for (vehicle) tracking on Google maps.

    Read the article

  • Good value for declaring "Position reached" in geo coords

    - by poeschlorn
    Hi Guys, I've written a kind of navigation system for pedestrians. The only thing is, that I need a criterion to finish the navigation. My values are gives as lat/long pairs. What would you assume would be a good value to say, both positions are equal/near enough to tell the user that he has reached the goal? Please keep also in mind, that it's idfficult to say "directly equal", because GPS modules may have variances... greetz from europe, poeschlorn

    Read the article

  • Getting location via a web application being run in a WebView

    - by synic
    m.google.com somehow requests the current location when loaded in Android's browser. I want to do the same thing from a web page being loaded into a WebView in my own application. Is the only way to go about this with WebView.addJavascriptInterface(), or is there already a javascript interface available for webapps to use?

    Read the article

  • location getting some times and sometimes not

    - by Chaitanya Sai
    // in this i'm getting location sometimes and sometimes location is not retrieving i had turned gps and gprs on and added permissions required . i'm bot getting what actually the problem is package com.example.addr; import java.util.List; import java.util.Locale; import android.location.Address; import android.location.Criteria; import android.location.Geocoder; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.app.Activity; import android.content.Context; import android.view.Menu; import android.widget.TextView; public class MainActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); LocationManager locationManager; String context = Context.LOCATION_SERVICE; locationManager = (LocationManager)getSystemService(context); Criteria crta = new Criteria(); crta.setAccuracy(Criteria.ACCURACY_FINE); crta.setAltitudeRequired(false); crta.setBearingRequired(false); crta.setCostAllowed(true); crta.setPowerRequirement(Criteria.POWER_LOW); String provider = locationManager.getBestProvider(crta, true); // String provider = LocationManager.GPS_PROVIDER; Location location = locationManager.getLastKnownLocation(provider); updateWithNewLocation(location); locationManager.requestLocationUpdates(provider, 2000, 10, locationListener); } private final LocationListener locationListener = new LocationListener() { @Override public void onLocationChanged(Location location) { updateWithNewLocation(location); } @Override public void onProviderDisabled(String provider) { updateWithNewLocation(null); } @Override public void onProviderEnabled(String provider) { } @Override public void onStatusChanged(String provider, int status, Bundle extras) { } }; private void updateWithNewLocation(Location location) { String latLong; TextView myLocation; myLocation = (TextView) findViewById(R.id.myLocation); String addressString = "Sorry No Address Found"; if(location!=null) { double lat = location.getLatitude(); double lon = location.getLongitude(); latLong = "Lat:" + lat + "\nLong:" + lon; double lattitude = location.getLatitude(); double longitude = location.getLongitude(); Geocoder gc = new Geocoder(this,Locale.getDefault()); try { List<Address> addresses= gc.getFromLocation(lattitude, longitude, 1); StringBuilder sb = new StringBuilder(); if(addresses.size()>0) { Address address=addresses.get(0); for(int i=0;i<address.getMaxAddressLineIndex();i++) sb.append(address.getAddressLine(i)).append("\n"); sb.append(address.getLocality()).append("\n"); sb.append(address.getPostalCode()).append("\n"); sb.append(address.getCountryName()); } addressString = sb.toString(); } catch (Exception e) { } } else { latLong = " NO Location Found "; } myLocation.setText("Current Position is :\n"+ latLong + "\n"+ addressString ); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_main, menu); return true; } }

    Read the article

  • getting the value of a filter at an arbitrary time

    - by Andiih
    Context: I'm trying to improve the values returned by the iPhone CLLocationManager, although this is a more generally applicable problem. The key is that CLLocationManger returns data on current velocity as and when it feels like it, rather than at a fixed sample rate. I'd like to use a feedback equation to improve accuracy v=(k*v)+(1-k)*currentVelocity where currentVelocity is the speed returned by didUpdateToLocation:fromLocation: and v is the output velocity (and also used for the feedback element). Because of the "as and when" nature of didUpdateToLocation:fromLocation: I could calculate the time interval since it was last called, and do something like for (i=0;i<timeintervalsincelastcalled;i++) v=(k*v)+(1-k)*currentVelocity which would work, but is wasteful of cycles. Especially as I probably want timeintervalsincelastcalled to be measured as 10ths of a second. Is there a way to solve this without the loop ? i.e. rework (integrate?) the formula so I put an interval into the equation and get the same answer as I would have by iteration ?

    Read the article

  • Getting visitors country from their IP

    - by Ali Abdulkarim Salem
    i want to get visitors country via their IP.. right now I'm using this ( http://api.hostip.info/country.php?ip=...... ) here's my code <?php if (isset($_SERVER['HTTP_CLIENT_IP'])) { $real_ip_adress = $_SERVER['HTTP_CLIENT_IP']; } if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $real_ip_adress = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { $real_ip_adress = $_SERVER['REMOTE_ADDR']; } $cip = $real_ip_adress; $iptolocation = 'http://api.hostip.info/country.php?ip=' . $cip; $creatorlocation = file_get_contents($iptolocation); ?> Well, it's working properly, but the thing is, this returns the country code like US or CA., and not the whole country name like United States or Canada So, is there any good alternative to hostip.info offers this? I know that I can just write some code that will eventually turn this two letters to whole country name, but I'm just too lazy to write a code that contains all countries... P.S: For some reason I don't want to use any ready made CSV file or any code that will grab this information for me, something like ip2country ready made code and CSV.

    Read the article

  • Guidelines for LBS Mobile application development

    - by Suriyan Suresh
    i need some help!, i am planning to develop such LBS Mobile Application which find nearest things based on gps data from mobile. 1.what are the best free and (preferably) open source technologies for development?. 2.What programming language to use for development of such application?. 3.what are the points to be considered? I need the general overview of the requirements for planning, I was interested in having a general understanding of the data, tools, and frameworks required to accomplish the job.

    Read the article

  • Any Reliable API available to determine User's city and country from IP address

    - by Gublooo
    Heyy guys I wanted to check if anyone knows of a reliable API that we can use to determine the user's city and country from his IP address. My search on Google led to http://ipinfodb.com/ip_location_api.php It seems perfect but my only concern is the reliability of this service. Does google have anything like this. If you know any other Free or paid API's that help determine user's location from his IP - please let me know THanks

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13  | Next Page >