Search Results

Search found 822 results on 33 pages for 'latitude longitude'.

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

  • 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

  • How to order by results from 2 seperate tables in PHP and MySQL.

    - by Vafello
    I am trying to output results of 2 sql queries to one JSON file. The problem is that I would like to order them ascending by distance which is the result of equation that takes homelat and homelon from the users table and lat, lng from locations table.(basically it takes lattitude and longitude of one point and another and computes the distance between these points). Is it possible to take some parameters from both select queries, compute it and output the result in ascending order? $wynik = mysql_query("SELECT homelat, homelon FROM users WHERE guid='2'") or die(mysql_error()); ; $query = "SELECT * FROM locations WHERE timestamp"; $result = map_query($query); $points = array(); while ($aaa = mysql_fetch_assoc($wynik)) { while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { array_push($points, array('name'=>$row['name'], 'lat'=>$row['lat'], 'lng'=>$row['lng'], 'description'=>$row['description'], 'eventType'=>$row['eventType'], 'date'=>$row['date'], 'isotime'=>date('c', ($row['timestamp'])), 'homelat'=>$aaa['homelat'], 'homelon'=>$aaa['homelon'])); } echo json_encode(array("Locations"=>$points));

    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

  • Using http request on Yahoo Map Service C#

    - by Tang
    Hi I'm currently using yahoo map service to display a static image of a location with the latitude and longitude that I suppiled, and this work fine. But I was just wondering if it possible to send an url request to the service that will return an image with multiple markers on the image? (ie. more than one locations marked). If anyone know how to do this, please help! Thank you very much! ps. I am developing my application for windows mobile using .NET CF 3.5 with windows mobile 6 professional as a target platform.

    Read the article

  • help with accessing an array/object

    - by noname
    i have printed out the contents of an array/object (named 'document') with print_r. it looks like this: Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [id] => 7006276 ) [name] => Arnessysla [type] => region [latitude] => 64.5833 [longitude] => -21.8833 [entities] => SimpleXMLElement Object ( ) ) ) how do i get the 'entities' contents? i've tried this: $document[0]-attributes['entities'] but it didnt work!

    Read the article

  • Display selectedAnnotation info

    - by elife_iPhone
    When I use this: - (void)mapView:(MKMapView *)myMapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control { NSLog(@"SelectedAnnotations is %@", myMapView.selectedAnnotations); } It Displays this in the log. "<Annotation: 0x586cdb0>" Now this is a weird question, but how do I get the info from this Annotation? I have lost my mind. This is what is in the annotation. myAnnotation = [[Annotation alloc] init]; myAnnotation.dealName=[NSString stringWithFormat:@"%@",[tempValue objectForKey:@"name"]]; myAnnotation.subName=[NSString stringWithFormat:@"Price: $%@",[tempValue objectForKey:@"price"]]; myAnnotation.latitude = [NSNumber numberWithDouble:[[tempValue objectForKey:@"dealLatitude"] doubleValue]]; myAnnotation.longitude = [NSNumber numberWithDouble:[[tempValue objectForKey:@"dealLongitude"] doubleValue]]; myAnnotation.dealId = [NSNumber numberWithInt:[ [tempValue objectForKey:@"dId"] intValue ]]; Thanks for your help.

    Read the article

  • android RegEx external GPS string

    - by user1271363
    I have a problem with seperating information in a string i get from the external GPS stream. Heres a example of a string: $GPGSV,3,3,12,22,09,276,31,25,24,247,24,27,54,131,,32,04,359,19*71 $GPGLL,5703.85365,N,00953.88360,E,075510.00,A,A*69 $GPPWR,028a,1,0,1,1 $GPRMC,075511.00,A,5703.85369,N,00953.88430,E,0.335,302.17,070912,,,A*6E $GPVTG,302.17,T,,M,0.335,N,0.621,K,A*3A Want i am trying to do is to get the " $GPGLL,5703.85365,N,00953.88360,E,075510.00,A,A*69 " out so i can grab the longtitude and latitude and then update my textview with it. But keep getting string out of bounch exeption and i start wondering if i am handling this in the wrong way. Anyone that can put me in the right direction in how to solve this?

    Read the article

  • Android application: showing overlay items in AsyncTask

    - by user1707887
    I am building an android application that uses google maps to overlay items. The latitude and longitude for the items I get from a MySQL database. To do this I connect to a php script using HTTP in Async Task. My code for displaying items on the map is in the onPostExecute() method of Async Task. Everything works fine but when I for example rotate the phone all my overlayed items disappear. How can I resolve this issue? Should overlaying the items happen in the main thread? If so, I need to somehow pass the information from the async taks to the main thread, which I have looked into but have not been able to get that working. If somebody knows a good and right way to do this, I would really appreciate the help.

    Read the article

  • How to use GPS data like the double value returned by getLatitude()?

    - by Dan
    I have been searching quite a bit for an answer, but maybe I'm just not using the correct terminology. I am creating an app that will access a database to return a list of other users that are within a certain distance of the users location. I've never worked with this type of data, and I don't really know what the values mean. I'd like to do all the calculations on the backend with either MySQL or PHP. Currently, I am storing the latitude and longitude as doubles within the database. I can access them and store them, but I have no idea how I might be able to sort them based on distance. Perhaps I should be using a different type or some technique that is common in this area. TIA.

    Read the article

  • To find busstop with timetable data and more near me(current postion)

    - by Sabby
    I am developing an application which helps the user to find the bus stops near him through his current latitude and longitude. This will also give the time table of the bus, route direction, bus name etc. I searched over the google but didn't get success. I tried the trimet api, but that was also not much helpful as it only works for Portland area and the pin is always dropped on the map on Portland. Please help me! Is there any api to do this? This app is for our client. User will input the route id, loc id or what and will get all the detail of near by bus stops and their lat,long.

    Read the article

  • Android GPS data of Railway Stations of India

    - by user578098
    Hi, I want to make an android application that will intimate the users about the approaching railway stations in INDIA. For this I will use GPS (Location Manager etc) on Android. So far, I have not developed the applications using GPS, so I have little insight on the capabilities of Android API for this. I know, through the android API I can know the current location of the users through GPS and google API but can I know the location of nearby railway stations from Google API for India? Or can I know the latitude and longitude of all the Railway Stations so that I can pre-feed that in the applciation? Please help me in finding out the way.

    Read the article

  • Extracting ID from data packet GPS

    - by user604134
    Hi , I am trying to configure a GPS device to my systems. The GPS device send the data packet to my IP in the following format : $$?W??¬ÿÿÿÿ™U042903.000,A,2839.6408,N,07717.0905,E,0.00,,230111,,,A*7C|1.2|203|0000÷ I am able to extract the latitude, longitude and other information but I am not able to extract the Tracker ID out of the string. According to the manual the ID is in hex format.And the format of the packet is $$\r\n I dont know what to do with it, I have tried converting this to hex..but it didnt work. Any help will be greatly appreciate. Thanks

    Read the article

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