Search Results

Search found 806 results on 33 pages for 'latitude'.

Page 26/33 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • need some tips on Drupal $form value

    - by bert
    I got dpm($form) working. Nice! This is much better way to view data. I am still trying to figure out where stuff is coming from eg: location longitude & latitude. The word 'longitude' is referenced in 20 different places. I thought this was a likely place to isolate text box for this input field. dpm($form['#field_info']['field_store_latitude']['location_settings']['form']['fields']); Any tips on how to track down individual input elements?

    Read the article

  • What parameters should I use in a Google Maps URL to go to a lat-lon?

    - by xpda
    I would like to produce a url for Google Maps that goes to a specific latitude and longitude. Now, I generate a url such as this: http://maps.google.com/maps?z=11&t=k&q=58 41.881N 152 31.324W The resulting map comes up with a round "A" balloon pointer, which seems to point to the nearest named object, and a green arrow, which points to the lat-lon. Sometimes, as in this example, the "A" pointer is centered and is far enough away that you cannot see the pointer to the lat-lon. (Zoom out to see both pointers in this example. The "A" pointer is in the center of Alaska, while the lat-long pointer is on Kodiak Island.) Are there some parameters I can use in the Google Maps URL that will produce a single pointer to a designated lat-lon? (This loads in a separate window. It is not embedded.)

    Read the article

  • I cannot run application on android, but emulator can.

    - by Daisy
    protected void showCurrentLocation(){ Location lc = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER); if(lc != null){ String msg = String.format("Current Location \n Logitude: %1$s \n Latitude: %2$s",lc.getLongitude(),lc.getLatitude()); Toast.makeText(Test1.this,msg,3000).show(); } Toast.makeText(Test1.this,"location is null",3000).show(); } from code above, when I run on android phone. It can run but its only show location is null. I don't know why its can't get location from getLastKnownLocation() http://www.javacodegeeks.com/2010/09/android-location-based-services.html This is a source code which I got to tried. Please help me. Thanks ka :)) Ps. I already have I already have ACCESS_FINE_LOCATION,ACCESS_MOCK_LOCATION, and ACCESS_COARSE_LOCATION

    Read the article

  • Data scheme question

    - by Matt
    I am designing a data model for a local city page, more like requirements for it. So 4 tables: Country, State, City, neighbourhood. Real life relationships is: Country owns multiple State which owns multiple cities which ows multiple neighbourhoods. In the data model: Do we link these with FK the same way or link each with each? Like in each table there will even be a Country ID, State ID, CityID and NeighbourhoodID so each connected with each? Other wise to reach neighbourhood from country we need to join 2 other tables in between? There are more tables I need to maintain for IP addess of cities, latitude/longitude, etc.

    Read the article

  • DataSet with many OR clauses

    - by Silvan
    Hello :) I've got a little problem with a query which I create in the Visual Studio Designer. I need a query with a lot of 'OR'-clauses for the same column. I found the operator 'IN', but I don't know how to use that in the Visual Studio Designer: Example IN: SELECT EmployeeID, FirstName, LastName, HireDate, City FROM Employees WHERE City IN ('Seattle', 'Tacoma', 'Redmond') I tried to do it in this way: SELECT [MachineryId], [ConstructionSiteId], [DateTime], [Latitude], [Longitude], [HoursCounter] FROM [PositionData] WHERE [MachineryID] IN @MachineryIDs But this doesn't work. Is there another way to handle a lot of OR clauses? Thank you very much for your help.

    Read the article

  • [iPhone] How to order an array

    - by Fabrizio
    Hi all, I got an array in my app and I need to order by one of its key. Basically what the app does is taking latitude and longitude somewhere, calculate the distance from my actual position and create an array containing a key called "distance". I'm using myArray sortUsingDescriptors: [NSArray arrayWithObject:[[[NSSortDescriptor alloc] initWithKey:@"distance" ascending:YES] autorelease]]]; I'm not sure it's working, I mean the first results are ordered but then it shows distance closer to the previous, as example: 0.8 km 1.6 km 1.9 km 10053.9 km 1098.0 km 2372.0 km 470.5 km Any suggestion? I thank you in advance for any kind of help. Fabrizio

    Read the article

  • Android google.navigation Intent Modes?

    - by Patrick Mahoney
    I'm currently developing an application that will launch a navigation intent. I know that this isn't an official API, but it works perfectly the way I want it to. I allow the user to select driving, walking, and bus navigation to a location. The intent to launch directly into Google Maps Navigation looks like this: google.navigation:ll= + a latitude and longitude, then + &mode= then your mode of transportation. For example, to navigate using walking directions to a certain area: google.navigation:ll=blah,blah&mode=w Driving is default, or &mode=d, and biking is &mode=b, but I can't figure out bus (public transit). Has anyone done this before? Thanks! Edit: So far, I've found that mode=public gives bike directions, mode=transit gives driving, frustratingly, mode=bus also returns bike directions.

    Read the article

  • What software design pattern is best for the following scenario (C#)

    - by askjdh
    I have a gps device that records data e.g. datetime, latitude, longitude I have an sdk that reads the data from the device. The way the data is read: A command packet (basically a combination of int values in a struct) is sent to the device. The device responds with the data in fixed size chunks e.g. 64bytes Depending on the command issued I will get back differect data structs e.g. sending command 1 to the device returns a struct like struct x { id int, name char[20] } command 2 returns a collection of the following structs (basically it boils down to an array of the structs - y[12]) struct y { date datetime, lat decimal, lon decimal } I would then want to convert the struct to a class and save the data to a database. What would be the best way to encapsulate the entire process, preferably using some established design pattern? Many thanks M

    Read the article

  • Python: Repeat elements in a list comprehension?

    - by User
    I have the following list comprehension which returns a list of coordinate objects for each location. coordinate_list = [Coordinates(location.latitude, location.longitude) for location in locations] This works. Now suppose the location object has a number_of_times member. I want a list comprehension to generate n Coordinate objects where n is the number_of_times for the particular location. So if a location has number_of_times = 5 then the coordinates for that location will be repeated 5 times in the list. (Maybe this is a case for a for-loop but I'm curious if it can be done via list comprehensions)

    Read the article

  • annotation pins in iphone

    - by alecnash
    Guys I am a little bit stuck here. So here it goes. I am using json to get latitude and longitude for a map project. I use these values to add some pins on the map. I also created a detail view for the pins. Here comes the tricky part. I want to load some images from my db to the detail view but I don't know how to tell the pins appart so the right image goes to the right pin. Thanks in advance

    Read the article

  • press button to open web page from app

    - by Lee
    I have an app that I want to interact with a web page. Basically I want to press a button and the web page will open in a new view... Sorry I wasn't clear, I am developing on a Mac for an iPhone. Currently I have a "locate me" app that displays your Latitude and Longitude. I want to use those variables to populate 2 of the blanks on a PHP web page/form I have developed. I have added a label and button to my current app, when the button is pressed the URL with the Lat and Long (as passed vars) are displayed in the label. I want those vars to appear on my web page. Hope this is clearer... Solved: I just added these lines of code I found here: NSURL *url = [ [ NSURL alloc ] initWithString: @"http://www.cnn.com" ]; [[UIApplication sharedApplication] openURL:url];

    Read the article

  • CURL issue in PHP while getting location list

    - by Ajay
    I am retrieving the nearest locations available from a given address (Longitude/Latitude) from geolocation website. It works fine, but for some places it gives junk characters in the name. Moreover, in browser I am getting different characters compared to my PHP CURL functionality. Here is the URL http://www.geoplugin.net/extras/nearby.gp?lat=17.7374669&long=83.3214858&limit=5&radius=50&format=php One of the location is "Sitampeta" in original location name, but in browser I am getting "Sitammapeta" where as in CURL function I am getting "SÄ«tammapeta". Please tell me why this difference. I wrote a function to convert browser output to original which works fine. function convert ($old) { $n=""; for ($i=0; $i<strlen($old); $i++) { $n .= chr(ord(substr($old,$i,1))); } return $n; } But I dont understand how I convert the CURL output to original name.

    Read the article

  • Using javascript to access a json array from php

    - by celenius
    I'm trying to understand how my php script can pass an array to my javascript code. Using the following php, I pass an array: $c = array(3,2,7); echo json_encode($c); My javascript is as follows: $.post("getLatLong.php", { latitude: 500000}, function(data){ arrayData = data document.write(arrayData) document.write(arrayData[0]); document.write(arrayData[0]); document.write(arrayData[0]); }); </script> What is printed out on screen is [3,2,7][3, I'm trying to understand how json_encode works - I though I would be able to pass the array to a variable, and then access it like a normal javascript array, but it views my array as one large text string. How do ensure that it reads it like an array?

    Read the article

  • How to get the Zoom Levels and Lat and Long values of the Map when Zoom in/out.

    - by ChandraSekhar
    I am implement an application based on the MapKit using iphone sdk.I just now a method to get the event when we drag, zoom in/out on the map. The method is as like this (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated Now I need to get the following bullets. 1.TopLeft's and Bottom Right's Latitude and longitude values. 2.Center of the Map. 3.zoom level. Please give me suggessions to solve the above 3 use cases. Thanks in Advance, Sekhar Bethalam.

    Read the article

  • Variable scope in javascript

    - by Rich Bradshaw
    This is a simple question, but I can't work it out. The specifics aren't important, but here's the gist. I have some code like this: var lat = 0; var lon = 0; if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { lat = position.coords.latitude; lon = position.coords.longitude; }); } What I think it's doing is: Set lat and lon to 0 If the browser has geolocation, overwrite those variables with real values However, at the end of that chunk, lat and lon are still 0. I've tried adding vars, passing lat and lon to the function etc but with no success... How do I make this work?

    Read the article

  • Plotting 500 US cities to a map

    - by sqlman
    I have 500 US cities in a MySQL table. I have the city name, state, longitude and latitude. I want to visually see these cities plotted on a map of the US. How can I do this? Are they any free tools available? Google Maps or Google Earth maybe? Obviously, it would take forever to plot each city individually. So I need a quick way of doing it, either through a program or by exporting the table as a spreadsheet and uploading it into some kind of generator that will do the plotting for me. Please let me know your ideas. Thanks.

    Read the article

  • How do I read from a file consists of city names and coordinates/Populations and create functions to get the coordinates and population?

    - by Braybray
    I'm using Python, and I have a file which has city names and information such as names, coordinates of the city and population of the city: Youngstown, OH[4110,8065]115436 Yankton, SD[4288,9739]12011 966 Yakima, WA[4660,12051]49826 1513 2410 Worcester, MA[4227,7180]161799 2964 1520 604 Wisconsin Dells, WI[4363,8977]2521 1149 1817 481 595 How can I create a function to take the city name and return a list containing the latitude and longitude of the given city? fin = open ("miles.dat","r") def getCoordinates cities = [] for line in fin: cities.append(line.rstrip()) for word in line: print line.split() That's what I tried now; how could I get the coordinates of the city by calling the names of the city and how can I return the word of each line but not letters? Any help will be much appreciated, thanks all.

    Read the article

  • SQL Server 2008 - Get Geography From Record

    - by user336786
    Hello, I am new to using the geography types in SQL Server 2008. I have a table in my database called "Location". "Location" has the following columns and types: Location -------- City nvarchar(256) State nvarchar(256) PostalCode nvarchar(25) Latitude decimal(9, 6) Longitude decimal(9, 6) Each Location is related to a Store record in my database. I am trying to find the stores within a 10 mile radius or postal code or city/state that a user enters. To accomplish this, I know that I need to rely on geographies. At this time I have: DECLARE @startingPoint geography; SET @startingPoint=geography::STGeomFromText('POINT(-122.34900 47.65100)', 4326); That gives me the starting point from a hard-coded textual value. However, I do not know how to convert a lat/long from my Location table into a geography instance. How do I convert a lat/long in my database to a geography instance so I can continue to work on my query? Thank you!

    Read the article

  • C - Discard the edges of an arbitrary level of a multidimensional array

    - by Medivh
    I have some geographical data, that I'm trying to parse into a usable format. The data is kept in NetCDF files, and is read out as a multidimensional array. My problem comes because the source of the geographical data has a strip of longitude on each side of the grid that overlaps the other side. That is, I have a longitude point of -1 degree, and another of 361 degrees. Unfortunately, I've got time, latitude, and sometimes height as dimensions in this array as well, and I have no way of predicting in advance where each dimension will be in the list (or if it's a three dimensional array, or a four dimensional array). Further complicating the problem, the array can be of floats, doubles or integers, so I have to pass it around as a void. Are there any NetCDF tools that I can use to pre-prepare the files? If not, how would you suggest I go about stripping the excess longitudes?

    Read the article

  • Mysql retrieve polygon data

    - by dskanth
    Hi, i have been developing a site that stores spatial data in mysql database, like that of buildings, gardens, etc. in the form of polygons (latitudes and longitudes). I want to know how to retrieve polygon data in mysql. I have seen this sample query to insert a polygon data: http://amper.110mb.com/SPAT/mysql_initgeometry2.htm But now i want to know how to retrieve data from the table, based on certain constraints like: "where latitude < 9.33 and longitude > 22.4" Also how do i find whether a point lies inside or outside of a polygon

    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

  • Does the Quick Search Box search the database in Android? how?

    - by Praveen Chandrasekaran
    i have an database with the values of latitude and longitude. i would need to search those values depends on the user input. does the quick search box can search only the database value with the type-to-search feature. Else i want to put a separate EditText and then do the the search process.. if QSB is possible then how to do that? i want to search and drop a pin on the map.. please make a note of it. Any Idea, tutorial and sample codes are most thankful?

    Read the article

  • How do i open Google Maps for directions using coordinates on the iphone

    - by Aran Mulholland
    I am using UIMapView to display locations on the iPhone. I want to do a directions from current location to the location of interest, I don't think its possible using MapKit (but if it is please inform) So I will open either the Google Maps application or safari to display it. Can i do this by specifying co-ordinates from (current location) to co-ordinates (the location of interest) I have these longitudes and latitudes. Or do i have to use street addresses? If I do have to use street addresses, can i get them from the latitude and longitude.

    Read the article

  • How to read comma separated values from text file in JAVA?

    - by user1425223
    I have got this text file with latitude and longitude values of different points on a map. I want to store these coordinates into a mySQL database using hibernate. I want to know how can I split my string into latitudes and longitudes? What is the general way to do these type of things that is with other delimiters like space, tab etc.? File: 28.515046280572285,77.38258838653564 28.51430151808072,77.38336086273193 28.513566177802456,77.38413333892822 28.512830832397192,77.38490581512451 28.51208605426073,77.3856782913208 28.511341270865113,77.38645076751709 28.510530488025346,77.38720178604126 28.509615992924807,77.38790988922119 28.50875805732363,77.38862872123718 28.507994394490268,77.38943338394165 28.50728729434496,77.39038825035095 28.506674470385246,77.39145040512085 28.506174780521828,77.39260911941528 28.505665660113582,77.39376783370972 28.505156537248446,77.39492654800415 28.50466626846366,77.39608526229858 28.504175997400655,77.39724397659302 28.503685724059455,77.39840269088745 28.503195448440064,77.39956140518188 28.50276174118543,77.4007523059845 28.502309175192945,77.40194320678711 28.50185660725938,77.40313410758972 28.50140403738471,77.40432500839233 28.500951465568985,77.40551590919495 28.500498891812207,77.40670680999756 28.5000463161144,77.40789771080017 28.49959373847559,77.40908861160278 Code I am using to read from file: try { BufferedReader in = new BufferedReader(new FileReader("G:\\RoutePPAdvant2.txt")); String str; str = in.readLine(); while ((str = in.readLine()) != null) { System.out.println(str); } in.close(); } catch (IOException e) { System.out.println("File Read Error"); }

    Read the article

  • My application crashing Please help me out.

    - by kiran kumar
    My Application get crashing ... its loading data of all the cities... and when i click its displaying my detailed view controller.... when iam getting back from my controller... and selecting another city my application get crashed.. Please help me out. To get idea i am pasting my code. #import "CityNameViewController.h" #import "Cities.h" #import "XMLParser.h" #import "PartyTemperature_AppDelegate.h" #import "CityEventViewController.h" @implementation CityNameViewController //@synthesize aCities; @synthesize appDelegate; @synthesize currentIndex; @synthesize aCities; /* // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { // Custom initialization } return self; } */ // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; self.title=@"Cities"; appDelegate=(PartyTemperature_AppDelegate *)[[UIApplication sharedApplication]delegate]; } /* // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } */ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { // Return the number of sections. return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { // Return the number of rows in the section. return [appDelegate.cityListArray count]; } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 95.0f; } - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator; cell.textLabel.textColor = [[[UIColor alloc] initWithRed:0.2 green:0.2 blue:0.6 alpha:1] autorelease]; cell.detailTextLabel.textColor = [UIColor blackColor]; cell.detailTextLabel.font=[UIFont systemFontOfSize:10]; if (indexPath.row %2 == 1) { cell.backgroundColor = [[[UIColor alloc] initWithRed:0.87f green:0.87f blue:0.87f alpha:1.0f] autorelease]; } else { cell.backgroundColor = [[[UIColor alloc] initWithRed:0.97f green:0.97f blue:0.97f alpha:1.0f] autorelease]; } } // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; cell.selectionStyle= UITableViewCellSelectionStyleBlue; // cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator; cell.backgroundColor=[UIColor blueColor]; } // aCities=[appDelegate.cityListArray objectAtIndex:indexPath.row]; // cell.textLabel.text=aCities.city_Name; cell.textLabel.text=[[appDelegate.cityListArray objectAtIndex:indexPath.row]city_Name]; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ //http://compliantbox.com/party_temperature/citysearch.php?city=Amsterdam&latitude=52.366125&longitude=4.899171 NSString *url; aCities=[appDelegate.cityListArray objectAtIndex:indexPath.row]; if ([appDelegate.cityListArray count]>0){ url=@"http://compliantbox.com/party_temperature/citysearch.php?city="; url=[url stringByAppendingString:aCities.city_Name]; url=[url stringByAppendingString:@"&latitude=52.366125&longitude=4.899171"]; NSLog(@"url value is %@",url); [self parseCityName:[[NSURL alloc]initWithString:url]]; } } -(void)parseCityName:(NSURL *)url{ NSXMLParser *xmlParser=[[NSXMLParser alloc]initWithContentsOfURL:url]; XMLParser *parser=[[XMLParser alloc] initXMLParser]; [xmlParser setDelegate:parser]; BOOL success; success=[xmlParser parse]; if (success) { NSLog(@"Sucessfully parsed"); CityEventViewController *cityEventViewController=[[CityEventViewController alloc]initWithNibName:@"CityEventViewController" bundle:nil]; cityEventViewController.index=currentIndex; [self.navigationController pushViewController:cityEventViewController animated:YES]; [cityEventViewController release]; cityEventViewController=nil; } else { NSLog(@"Try it Idoit"); UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"Alert!" message:@"Event Not In Radius" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; [alert release]; } } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { [super viewDidUnload]; // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [aCities release]; [super dealloc]; } @end And the error is * Terminating app due to uncaught exception 'NSRangeException', reason: ' -[NSMutableArray objectAtIndex:]: index 1 beyond bounds for empty array' ** Call stack at first throw:

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >