Is there a way using the MGMaps Lib to get the GPS position from a adress?
Thanks
Does it work now ?
It gives me the following error..
Info > Downloading http://lbs.nutiteq.ee/cloudmade/geocode_kml.php?out=kml&near=59%2E439489N%2C%2024%2E75769E&t=q&q=London&lang=et&cat=&max=10&gzip=yes
Debug > TO: ineterrupt after 20000
Debug > Connection opened in 21328
Debug > Response NOT packed based on first 2 data bytes
Debug > Error decompressing gzip data, using it as uncompressed
Debug > KmlReader done
Debug > Response read in 94
- sundar
It seems that it does not work now. There is some network configuration issue, will be fixed soon.
Should be fixed now. Please report if irregularities are there.
Hi jaak, seems like geocoding service is down again. I am getting the "Response NOT packed based on first 2 data bytes" error. Do u what might be the problem?
my code is like this:
_googleKML = new GeocodingService(thisScreen, GeocodingService.DEFAULT_URL,
"et", currentWP, "Vancouver", GeocodingService.SEARCH_TYPE_GEOCODING, new int[0], 10, false);
_googleKML.execute();
the Console debugged is:
Info > Downloading http://lbs.nutiteq.ee/cloudmade/geocode_kml.php?out=kml&near=48%2E144097N%2C%20%2D121%2E915283E&t=q&q=Vancouver&lang=et&cat=&max=10&gzip=no;deviceside=true
Debug > Connection opened in 916
needRepaint complete=true
needRepaint complete=true
Debug > Response NOT packed based on first 2 data bytes
needRepaint complete=true
needRepaint complete=true
Debug > KmlReader done
oh, it seems to work alright. Just getting the debug message: "Debug > Response NOT packed based on first 2 data bytes" and thought it's not working again.
What does "Debug > Response NOT packed based on first 2 data bytes" mean?
You can just ignore it. Message comes as the geocoding proxy can gzip response, so there is less data in the HTTP traffic. For easier troubleshooting the compression is off currently. Client detects automatically whether data is gzip-ed or not (based on GZIP header signature).
Btw, can you try also direct service to CloudMade, without the proxy? It was just added to the latest beta (nutiteq.com/beta/lib) as CloudMadeGeocodingService() . See http://www.nutiteq.com/query-string-encoding-geocodingservice post last comments.
I try to do like that and it works fine. But some queryString (Street name in my city - Hanoi, VietNam), it gets errors.
Can I replace GeocodingService.DEFAULT_URL with another geocoding services URL ? Can you suggest some ?
Yes, you can change the URL, but I do not know really any good alternative now for the area.
You probably mean geocoding, address search? This is possible.
1. implement GeocodingResultWaiter on your class
2. it requires adding methods searchResults(KmlPlace[]) and errors(int errorId)
3. call geocoder:
final int[] cat = new int[0];
final GeocodingService service = new GeocodingService(this, GeocodingService.DEFAULT_URL,
"en", new WgsPoint(0,0), queryString, GeocodingService.SEARCH_TYPE_GEOCODING, cat, 10, false);
service.execute();
4. if result is ok, searchResults() is called as callback method with array if KmlPlace objects (in best case there is just one, but often search is too ambigious). If error, then errors() is called
See from samples "mapper" application, it has placename search functionality.
/JaakL