hey guys,
I have been trying to do a pretty simple geocoding example but each
time i get an "invalid label" error in firefox. and the response is
always null. Here's my code. help... please..
<script type='text/javascript'>
//<![CDATA[
//load the map
$(function() {
initialize();
});
//initialize the map when document is ready
var map = null;
var geocoder = null;
function initialize() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(38, -97.0), 4);
geocoder = new GClientGeocoder();
}
}
//function to zoom into state
function goToState(address) {
address = "Flushing NY 11355 USA"; //hardcode address to
test...
if (geocoder) {
geocoder.getLatLng(
address,
function(point) {
if (point.Status.code == "200") {
map.setCenter(point, 13);
var marker = new GMarker(point);
map.addOverlay(marker);
marker.openInfoWindowHtml(address);
} else {
alert(address + point + " not found");
}
}
);
}
}
//]]>
Here's the detailed error i get...
invalid label
isCachable()("Flushing NY 11355 USA")main.js (line 1461)
f()("Flushing NY 11355 USA")1qwI%2FO...wAg%3D%3D (line 1)
f()(1, "Flushing NY 11355 USA", function())1qwI%2FO...wAg%3D%3D (line
1)
f()("NY 11355 USA", function())1qwI%2FO...wAg%3D%3D (line 1)
f()("Flushing NY 11355 USA", function())1qwI%2FO...wAg%3D%3D (line 1)
Tf()()main.js (line 194)
Uf()()main.js (line 204)
require()()main.js (line 177)
Sz()("legacy_api_gc", 1, function(), undefined, false)main.js (line
174)
require()("legacy_api_gc", 1, function(), undefined, false)main.js
(line 178)
Of("legacy_api_gc", 1, function(), undefined, false)main.js (line 186)
d()main.js (line 198)
Uf()()main.js (line 205)
Tf()()main.js (line 195)
goToState(" Flushing NY 11355 USA")browse (line 174)
javascript:%20goToState('CA');()()javascri...te('CA'); (line 1)
[Break on this error] "name": "Flushing NY 11355 USA",\n
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---