[Google Maps API v3] Re: Geocoder fail

2011-07-30 Thread geocode...@gmail.com
On Jul 30, 6:52 pm, "geocode...@gmail.com" 
wrote:
> On Jul 30, 6:36 pm, amnesia7  wrote:
>
> > Thanks, just tried it again with your advice. I zoomed out to show
> > entire UK and then did the search and it worked, I think I was zoomed
> > in too much and it was just missing showing manchester at the time so
> > it wasn't in the "viewport".
>
> If you notice the autocomplete example binds the map's bounds to the
> places search. You don't have to do that.  If you know the area to be
> searched, provide that instead.

But if you know where it is already, you probably shouldn't be using
the geocoder or the places search, use the coordinates.  Dynamic
searches should be used for user input.

  -- Larry

>
>   -- Larry
>
>
>
>
>
>
>
>
>
> > A little annoying but I suppose its something to bear in mind.
>
> > Col
>
> > On Jul 31, 2:21 am, "geocode...@gmail.com" 
> > wrote:
>
> > > On Jul 30, 6:01 pm, amnesia7  wrote:
>
> > > > I've just tried searching for it using the Places API (http://
> > > > code.google.com/apis/maps/documentation/javascript/examples/places-
> > > > autocomplete.html  with the "All" radio button set) and it's a bit
> > > > weird.
>
> > > > If I try to type in "manchester evening news arena" it doesn't find
> > > > anything. However, if I search for "manchester" first to set the map
> > > > there and do another search for "manchester evening news arena" it
> > > > finds it.
>
> > > > Anybody got an explanation?
>
> > > Did you read the documentation for the places 
> > > API?http://code.google.com/apis/maps/documentation/javascript/places.html...
>
> > > From my read, that behavior makes perfect sense:
> > > + Place Search Requests
> > > + Place Searches are initiated with a call to the PlacesService's
> > > search() method.
> > > + This method takes a request with the following fields:
> > > + Either of:
> > > + bounds, which must be a google.maps.LatLngBounds object defining the
> > > rectangle in which to
> > > + search; or
> > > + a location and radius; the former takes a google.maps.LatLng object,
> > > and the radius takes a
> > > + simple integer, representing the circle's radius in meters.
>
> > > And for autocomplete:
> > > + Adding Autocomplete
> > > + The Autocomplete constructor takes two arguments:
> > > + An HTML input element of type text. This is the input field that the
> > > Autocomplete service will
> > > + monitor and attach its results to.
> > > + An options argument, which can contain:
> > > + types, which can be either establishment or geocode, representing
> > > businesses or addresses,
> > > + respectively. If types is not specified, both types are returned.
> > > + bounds is a google.maps.LatLng object specifying the area in which
> > > to search for Places. The
> > > + results are biased towards, but not restricted to, Places contained
> > > within these bounds.
>
> > >   -- Larry

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Geocoder fail

2011-07-30 Thread geocode...@gmail.com
On Jul 30, 6:36 pm, amnesia7  wrote:
> Thanks, just tried it again with your advice. I zoomed out to show
> entire UK and then did the search and it worked, I think I was zoomed
> in too much and it was just missing showing manchester at the time so
> it wasn't in the "viewport".

If you notice the autocomplete example binds the map's bounds to the
places search. You don't have to do that.  If you know the area to be
searched, provide that instead.

  -- Larry

>
> A little annoying but I suppose its something to bear in mind.
>
> Col
>
> On Jul 31, 2:21 am, "geocode...@gmail.com" 
> wrote:
>
>
>
>
>
>
>
> > On Jul 30, 6:01 pm, amnesia7  wrote:
>
> > > I've just tried searching for it using the Places API (http://
> > > code.google.com/apis/maps/documentation/javascript/examples/places-
> > > autocomplete.html  with the "All" radio button set) and it's a bit
> > > weird.
>
> > > If I try to type in "manchester evening news arena" it doesn't find
> > > anything. However, if I search for "manchester" first to set the map
> > > there and do another search for "manchester evening news arena" it
> > > finds it.
>
> > > Anybody got an explanation?
>
> > Did you read the documentation for the places 
> > API?http://code.google.com/apis/maps/documentation/javascript/places.html...
>
> > From my read, that behavior makes perfect sense:
> > + Place Search Requests
> > + Place Searches are initiated with a call to the PlacesService's
> > search() method.
> > + This method takes a request with the following fields:
> > + Either of:
> > + bounds, which must be a google.maps.LatLngBounds object defining the
> > rectangle in which to
> > + search; or
> > + a location and radius; the former takes a google.maps.LatLng object,
> > and the radius takes a
> > + simple integer, representing the circle's radius in meters.
>
> > And for autocomplete:
> > + Adding Autocomplete
> > + The Autocomplete constructor takes two arguments:
> > + An HTML input element of type text. This is the input field that the
> > Autocomplete service will
> > + monitor and attach its results to.
> > + An options argument, which can contain:
> > + types, which can be either establishment or geocode, representing
> > businesses or addresses,
> > + respectively. If types is not specified, both types are returned.
> > + bounds is a google.maps.LatLng object specifying the area in which
> > to search for Places. The
> > + results are biased towards, but not restricted to, Places contained
> > within these bounds.
>
> >   -- Larry

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Geocoder fail

2011-07-30 Thread amnesia7
Thanks, just tried it again with your advice. I zoomed out to show
entire UK and then did the search and it worked, I think I was zoomed
in too much and it was just missing showing manchester at the time so
it wasn't in the "viewport".

A little annoying but I suppose its something to bear in mind.

Col



On Jul 31, 2:21 am, "geocode...@gmail.com" 
wrote:
> On Jul 30, 6:01 pm, amnesia7  wrote:
>
> > I've just tried searching for it using the Places API (http://
> > code.google.com/apis/maps/documentation/javascript/examples/places-
> > autocomplete.html  with the "All" radio button set) and it's a bit
> > weird.
>
> > If I try to type in "manchester evening news arena" it doesn't find
> > anything. However, if I search for "manchester" first to set the map
> > there and do another search for "manchester evening news arena" it
> > finds it.
>
> > Anybody got an explanation?
>
> Did you read the documentation for the places 
> API?http://code.google.com/apis/maps/documentation/javascript/places.html...
>
> From my read, that behavior makes perfect sense:
> + Place Search Requests
> + Place Searches are initiated with a call to the PlacesService's
> search() method.
> + This method takes a request with the following fields:
> + Either of:
> + bounds, which must be a google.maps.LatLngBounds object defining the
> rectangle in which to
> + search; or
> + a location and radius; the former takes a google.maps.LatLng object,
> and the radius takes a
> + simple integer, representing the circle's radius in meters.
>
> And for autocomplete:
> + Adding Autocomplete
> + The Autocomplete constructor takes two arguments:
> + An HTML input element of type text. This is the input field that the
> Autocomplete service will
> + monitor and attach its results to.
> + An options argument, which can contain:
> + types, which can be either establishment or geocode, representing
> businesses or addresses,
> + respectively. If types is not specified, both types are returned.
> + bounds is a google.maps.LatLng object specifying the area in which
> to search for Places. The
> + results are biased towards, but not restricted to, Places contained
> within these bounds.
>
>   -- Larry

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Geocoder fail

2011-07-30 Thread geocode...@gmail.com
On Jul 30, 6:01 pm, amnesia7  wrote:
> I've just tried searching for it using the Places API (http://
> code.google.com/apis/maps/documentation/javascript/examples/places-
> autocomplete.html  with the "All" radio button set) and it's a bit
> weird.
>
> If I try to type in "manchester evening news arena" it doesn't find
> anything. However, if I search for "manchester" first to set the map
> there and do another search for "manchester evening news arena" it
> finds it.
>
> Anybody got an explanation?

Did you read the documentation for the places API?
http://code.google.com/apis/maps/documentation/javascript/places.html#place_searches

>From my read, that behavior makes perfect sense:
+ Place Search Requests
+ Place Searches are initiated with a call to the PlacesService's
search() method.
+ This method takes a request with the following fields:
+ Either of:
+ bounds, which must be a google.maps.LatLngBounds object defining the
rectangle in which to
+ search; or
+ a location and radius; the former takes a google.maps.LatLng object,
and the radius takes a
+ simple integer, representing the circle's radius in meters.

And for autocomplete:
+ Adding Autocomplete
+ The Autocomplete constructor takes two arguments:
+ An HTML input element of type text. This is the input field that the
Autocomplete service will
+ monitor and attach its results to.
+ An options argument, which can contain:
+ types, which can be either establishment or geocode, representing
businesses or addresses,
+ respectively. If types is not specified, both types are returned.
+ bounds is a google.maps.LatLng object specifying the area in which
to search for Places. The
+ results are biased towards, but not restricted to, Places contained
within these bounds.

  -- Larry

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Bad requests on custom tile overlays

2011-07-30 Thread Jason
Yep, that was it.. Working fine now.

Thanks again!

On Jul 30, 8:18 pm, Kesuke  wrote:
> Yup you are correct, it should be "?z="        "&x="       "&y="
>
> Hmmm, my guess is it's probably because you have cached some  of the
> images in chrome while tweaking it. Try dumping your temp. internet
> files, then when you revist the page click Ctrl-F5 to do a force
> refresh. It is probably because of the header("Cache-Control: max-
> age=84600") - which means that for 84600 seconds (ie 24 hours) the
> resources should be retrieved from the cache rather than your server.
>
> On Jul 31, 1:08 am, Jason  wrote:
>
> > Thanks for pointing that out. I'm assuming you mean the "/&x="  and  "/
> > &y="? I thought so too but the odd thing is it works fine without the
> > forward slashes in Firefox or IE but in Chrome the tiles don't load
> > without having the forward slashes there.
>
> > Not sure why that is.
>
> > On Jul 30, 5:47 pm, Kesuke  wrote:
>
> > > Your welcome, i'm also very pleased to have this sorted.
>
> > > On a side note, you don't need the forward slashes in your javascript,
> > > only your PHP. Even though it works it is probably best to remove them
> > > as it might throw up an error in some browsers.
>
> > > With $_GET, you stick a ? on the end of the URL. Then the variable
> > > name, followed by the equals sign and the value (number/letters etc.).
> > > If you want to add more than one set of values and variables, seperate
> > > them with the ampersand (&) symbol. You need the slashes in the PHP
> > > obviously because you are telling it to look for the next folder.
>
> > > On Jul 30, 10:27 pm, Jason  wrote:
>
> > > > Got it.. Thanks John.. I was working on it when you hit it probably.
>
> > > > Anyway, I think I've got it solved. Kesuke's PHP code was looking for
> > > > tiles named "zoom_x_y.png". My tms is a bit different, zoom and x are
> > > > folders and y is the tile png.
>
> > > > Changing the php $filename to:
>
> > > > $filename = "/var/www/merge/tiles/" . intval($_GET['z']) .
> > > > "/" .intval($_GET['x']) . "/" . intval($_GET['y']) . ".png";
>
> > > > and then in the map code changing the return statement to:
>
> > > > return "/merge/tiles.php?z=" + zoom + "/&x=" + coord.x + "/&y=" +
> > > > (Math.pow(2,zoom)-coord.y-1) + ".png";
>
> > > > seems to work for me. I have a google base layer, tiles and no 404s.
>
> > > > Kesuke, I can't thank you enough for that post. That problem was
> > > > bugging me for months!
>
> > > > Thanks much!
>
> > > > On Jul 30, 4:43 pm, John Coryat  wrote:
>
> > > > > Your page is generating errors:
> > > > > Uncaught ReferenceError: initialize is not defined
>
> > > > > I suggesting looking at the JavaScript console.
>
> > > > > -John Coryat- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Merge my db with establishment types request

2011-07-30 Thread amnesia7
I want to search my db for some locations and display them on a google
map.

I'll probably only be bringing back about 20 but they may be a mix of
establishment types. I'd then like to allow the user to filter the
results so it only shows particular establishment types.

Let's say it brings back "bar"s and "night_club"s but when the user de-
selects bars (by unchecking a checkbox for "bar" establishments)
there's only 1 night_club left out of the 20 results but if the user
had just been able to search my db for locations that I have that
google says are night_clubs then there could have been 3 displayed but
they were outweighed by all the bars that were returned closer to a
particular position.

Would I need to store the establishment type when I save the location
info to my database so that a user could filter particular
establishment types or is there a better way of doing this that I've
not thought of?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Geocoder fail

2011-07-30 Thread amnesia7
I've just tried searching for it using the Places API (http://
code.google.com/apis/maps/documentation/javascript/examples/places-
autocomplete.html  with the "All" radio button set) and it's a bit
weird.

If I try to type in "manchester evening news arena" it doesn't find
anything. However, if I search for "manchester" first to set the map
there and do another search for "manchester evening news arena" it
finds it.

Anybody got an explanation?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Geocoder fail

2011-07-30 Thread amnesia7
Yep, just tried it with the address instead and it works.d'oh,
looks like I'll need to use the places api instead then.

Thanks both of you, it had me completely confused.

Col

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Bad requests on custom tile overlays

2011-07-30 Thread Kesuke
Yup you are correct, it should be "?z=""&x="   "&y="

Hmmm, my guess is it's probably because you have cached some  of the
images in chrome while tweaking it. Try dumping your temp. internet
files, then when you revist the page click Ctrl-F5 to do a force
refresh. It is probably because of the header("Cache-Control: max-
age=84600") - which means that for 84600 seconds (ie 24 hours) the
resources should be retrieved from the cache rather than your server.

On Jul 31, 1:08 am, Jason  wrote:
> Thanks for pointing that out. I'm assuming you mean the "/&x="  and  "/
> &y="? I thought so too but the odd thing is it works fine without the
> forward slashes in Firefox or IE but in Chrome the tiles don't load
> without having the forward slashes there.
>
> Not sure why that is.
>
> On Jul 30, 5:47 pm, Kesuke  wrote:
>
>
>
> > Your welcome, i'm also very pleased to have this sorted.
>
> > On a side note, you don't need the forward slashes in your javascript,
> > only your PHP. Even though it works it is probably best to remove them
> > as it might throw up an error in some browsers.
>
> > With $_GET, you stick a ? on the end of the URL. Then the variable
> > name, followed by the equals sign and the value (number/letters etc.).
> > If you want to add more than one set of values and variables, seperate
> > them with the ampersand (&) symbol. You need the slashes in the PHP
> > obviously because you are telling it to look for the next folder.
>
> > On Jul 30, 10:27 pm, Jason  wrote:
>
> > > Got it.. Thanks John.. I was working on it when you hit it probably.
>
> > > Anyway, I think I've got it solved. Kesuke's PHP code was looking for
> > > tiles named "zoom_x_y.png". My tms is a bit different, zoom and x are
> > > folders and y is the tile png.
>
> > > Changing the php $filename to:
>
> > > $filename = "/var/www/merge/tiles/" . intval($_GET['z']) .
> > > "/" .intval($_GET['x']) . "/" . intval($_GET['y']) . ".png";
>
> > > and then in the map code changing the return statement to:
>
> > > return "/merge/tiles.php?z=" + zoom + "/&x=" + coord.x + "/&y=" +
> > > (Math.pow(2,zoom)-coord.y-1) + ".png";
>
> > > seems to work for me. I have a google base layer, tiles and no 404s.
>
> > > Kesuke, I can't thank you enough for that post. That problem was
> > > bugging me for months!
>
> > > Thanks much!
>
> > > On Jul 30, 4:43 pm, John Coryat  wrote:
>
> > > > Your page is generating errors:
> > > > Uncaught ReferenceError: initialize is not defined
>
> > > > I suggesting looking at the JavaScript console.
>
> > > > -John Coryat- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Bad requests on custom tile overlays

2011-07-30 Thread Jason
Thanks for pointing that out. I'm assuming you mean the "/&x="  and  "/
&y="? I thought so too but the odd thing is it works fine without the
forward slashes in Firefox or IE but in Chrome the tiles don't load
without having the forward slashes there.

Not sure why that is.

On Jul 30, 5:47 pm, Kesuke  wrote:
> Your welcome, i'm also very pleased to have this sorted.
>
> On a side note, you don't need the forward slashes in your javascript,
> only your PHP. Even though it works it is probably best to remove them
> as it might throw up an error in some browsers.
>
> With $_GET, you stick a ? on the end of the URL. Then the variable
> name, followed by the equals sign and the value (number/letters etc.).
> If you want to add more than one set of values and variables, seperate
> them with the ampersand (&) symbol. You need the slashes in the PHP
> obviously because you are telling it to look for the next folder.
>
> On Jul 30, 10:27 pm, Jason  wrote:
>
> > Got it.. Thanks John.. I was working on it when you hit it probably.
>
> > Anyway, I think I've got it solved. Kesuke's PHP code was looking for
> > tiles named "zoom_x_y.png". My tms is a bit different, zoom and x are
> > folders and y is the tile png.
>
> > Changing the php $filename to:
>
> > $filename = "/var/www/merge/tiles/" . intval($_GET['z']) .
> > "/" .intval($_GET['x']) . "/" . intval($_GET['y']) . ".png";
>
> > and then in the map code changing the return statement to:
>
> > return "/merge/tiles.php?z=" + zoom + "/&x=" + coord.x + "/&y=" +
> > (Math.pow(2,zoom)-coord.y-1) + ".png";
>
> > seems to work for me. I have a google base layer, tiles and no 404s.
>
> > Kesuke, I can't thank you enough for that post. That problem was
> > bugging me for months!
>
> > Thanks much!
>
> > On Jul 30, 4:43 pm, John Coryat  wrote:
>
> > > Your page is generating errors:
> > > Uncaught ReferenceError: initialize is not defined
>
> > > I suggesting looking at the JavaScript console.
>
> > > -John Coryat- Hide quoted text -
>
> > - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Bad requests on custom tile overlays

2011-07-30 Thread Kesuke
Your welcome, i'm also very pleased to have this sorted.

On a side note, you don't need the forward slashes in your javascript,
only your PHP. Even though it works it is probably best to remove them
as it might throw up an error in some browsers.

With $_GET, you stick a ? on the end of the URL. Then the variable
name, followed by the equals sign and the value (number/letters etc.).
If you want to add more than one set of values and variables, seperate
them with the ampersand (&) symbol. You need the slashes in the PHP
obviously because you are telling it to look for the next folder.

On Jul 30, 10:27 pm, Jason  wrote:
> Got it.. Thanks John.. I was working on it when you hit it probably.
>
> Anyway, I think I've got it solved. Kesuke's PHP code was looking for
> tiles named "zoom_x_y.png". My tms is a bit different, zoom and x are
> folders and y is the tile png.
>
> Changing the php $filename to:
>
> $filename = "/var/www/merge/tiles/" . intval($_GET['z']) .
> "/" .intval($_GET['x']) . "/" . intval($_GET['y']) . ".png";
>
> and then in the map code changing the return statement to:
>
> return "/merge/tiles.php?z=" + zoom + "/&x=" + coord.x + "/&y=" +
> (Math.pow(2,zoom)-coord.y-1) + ".png";
>
> seems to work for me. I have a google base layer, tiles and no 404s.
>
> Kesuke, I can't thank you enough for that post. That problem was
> bugging me for months!
>
> Thanks much!
>
> On Jul 30, 4:43 pm, John Coryat  wrote:
>
>
>
> > Your page is generating errors:
> > Uncaught ReferenceError: initialize is not defined
>
> > I suggesting looking at the JavaScript console.
>
> > -John Coryat- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Bad requests on custom tile overlays

2011-07-30 Thread Jason
Got it.. Thanks John.. I was working on it when you hit it probably.

Anyway, I think I've got it solved. Kesuke's PHP code was looking for
tiles named "zoom_x_y.png". My tms is a bit different, zoom and x are
folders and y is the tile png.

Changing the php $filename to:

$filename = "/var/www/merge/tiles/" . intval($_GET['z']) .
"/" .intval($_GET['x']) . "/" . intval($_GET['y']) . ".png";

and then in the map code changing the return statement to:

return "/merge/tiles.php?z=" + zoom + "/&x=" + coord.x + "/&y=" +
(Math.pow(2,zoom)-coord.y-1) + ".png";

seems to work for me. I have a google base layer, tiles and no 404s.

Kesuke, I can't thank you enough for that post. That problem was
bugging me for months!

Thanks much!




On Jul 30, 4:43 pm, John Coryat  wrote:
> Your page is generating errors:
> Uncaught ReferenceError: initialize is not defined
>
> I suggesting looking at the JavaScript console.
>
> -John Coryat

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Bad requests on custom tile overlays

2011-07-30 Thread John Coryat
Your page is generating errors:
Uncaught ReferenceError: initialize is not defined

I suggesting looking at the JavaScript console.

-John Coryat

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-maps-js-api-v3/-/NGZUvuGMAkUJ.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Geocoder fail

2011-07-30 Thread geocode...@gmail.com
On Jul 30, 9:07 am, amnesia7  wrote:
> I was testing the geocoder and no matter what I type I can't get it to come
> back with the MEN Arena, Manchester, UK

If you use its address, it should work.

  -- Larry

>  but if I put the same thing in the
> search on google maps it comes back with Manchester Evening News Arena,
> Manchester as expected.
>
> Can someone give me a clue why this might fail.
>
> Ta

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Bad requests on custom tile overlays

2011-07-30 Thread Kesuke
At a quick glance, have you noticed the $filename is expecting to
output a link in the following format:

$filename = /var/www/merge/tiles/zoom_x_y.png

But your files appear to me to be organised into something like /var/
www/merge/tiles/zoom/x/y.png ?

Take a closer look at the $filename, I suspect you need to change it a
bit (look at the . "_" . parts especially). Let me know how it goes.


On Jul 30, 8:50 pm, Jason  wrote:
> Thanks for posting that Kesuke! It would be great to get this working.
> Those 404s have been a headache for quite a while.
>
> I've implemented your example on a small test page and I'm not seeing
> any tiles. I'm not too familiar with PHP but I did check that safe
> mode is "off" with phpinfo.
>
> My php looks like this:
>
>  $filename = "/var/www/merge/tiles/" . intval($_GET['z']) .
> "_" .intval($_GET['x']) . "_" . intval($_GET['y']) . ".png";
>
>    header("Content-Type: image/png");
>    header("Cache-Control: max-age=84600");
>
>    if (file_exists($filename)) {
>        header("Content-Length: " . filesize($filename));
>        readfile($filename);
>    } else {
>        readfile("/var/www/merge/tiles/clear.png");
>    }
> ?>
>
> the tiles are at:
>
> http://69.164.209.124/merge/tiles/
>
> and the page is here:
>
> http://69.164.209.124/merge/mimagery.html
>
> Any idea what I'm missing here?
>
> Thanks in advance for a steer in the right direction.
>
> On Jul 30, 10:19 am, Kesuke  wrote:
>
>
>
> > Okay, thanks everyone – the PHP solution works great!
> > So here is a guide for Jason or anyone else who stumbles across this;
>
> > 1.) Make a new PHP file with the following code:
>
> > 
> >    $filename = "/usr/www/httpdocs/tiles/" . intval($_GET['z']) . "_" .
> > intval($_GET['x']) . "_" . intval($_GET['y']) . ".png";
>
> >    header("Content-Type: image/png");
> >    header("Cache-Control: max-age=84600");
>
> >    if (file_exists($filename)) {
> >        header("Content-Length: " . filesize($filename));
> >        readfile($filename);
> >    } else {
> >        readfile("/usr/www/httpdocs/clear.png");
> >    }
>
> > ?>
>
> > Basically this PHP script will check to see if the file exists. If it
> > does it will return the file. If it doesn't, it will return a 1px
> > empty image, in this case called 'clear.png'. The only stuff you
> > should need to change are the paths to clear.png and $filename. Be
> > aware that PHP safe mode can probably screw this up.
>
> > NOTE: counter-intuitively, PHP looks for the true file destination NOT
> > the URL. So you need to know your servers C:// style path to the file.
> > There are ways around it using fopen() but you would need to look
> > those up - not realising this gave me headaches.
>
> > 2.) Now, go into your map javascript and point to the PHP file instead
> > of the image URL. Specify the zoom/x/y co-ords which we will detect
> > using $_GET in our PHP script. If you don’t know what $_GET is have a
> > look on google as its quite fundamental – but in basic terms you send
> > variables and their values to a PHP document by appending the URL with
> > the format “map.html/?var=value&othervar=value”. PHP then plucks those
> > values and variables out for you to use.
>
> > So, using the above example:
>
> >   function createImageMapType(id) {
> >     return new google.maps.ImageMapType({
> >       getTileUrl: function(coord, zoom) {
> >             return "/tilefinder.php?z=" + zoom + "&x=" + coord.x + "&y=" +
> > coord.y;
> >       },
> >       tileSize: new google.maps.Size(256, 256),
> >       isPng: true,
> >           opacity: true
> >     });
> >   }
>
> > I hope this helps. So far it seems to be working well on my site,
> > there is a noticable improvement in load times and my Google PageSpeed
> > score got pushed up by about 20-30 points. If you want to improve
> > things further, I suggest setting a higher max-age (probably of 28
> > days/2419200) and also adding a last modified content-type header.
>
> > On Jul 30, 12:52 am, John Coryat  wrote:
>
> > > On Friday, July 29, 2011 6:20:03 PM UTC-5, Jason wrote:
>
> > > > Sorry for the noob question but does this require any other
> > > > configuration changes (ie. htaccess)? I've included this in my
> > > > index.html and it is still showing 404 errors in Chrome.
>
> > > > Thanks
>
> > > You'll have to be more specific. What did you try? What's the URL of your
> > > map?
>
> > > -John Coryat- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Bad requests on custom tile overlays

2011-07-30 Thread Jason
Thanks for posting that Kesuke! It would be great to get this working.
Those 404s have been a headache for quite a while.

I've implemented your example on a small test page and I'm not seeing
any tiles. I'm not too familiar with PHP but I did check that safe
mode is "off" with phpinfo.

My php looks like this:



the tiles are at:

http://69.164.209.124/merge/tiles/

and the page is here:

http://69.164.209.124/merge/mimagery.html

Any idea what I'm missing here?

Thanks in advance for a steer in the right direction.

On Jul 30, 10:19 am, Kesuke  wrote:
> Okay, thanks everyone – the PHP solution works great!
> So here is a guide for Jason or anyone else who stumbles across this;
>
> 1.) Make a new PHP file with the following code:
>
> 
>    $filename = "/usr/www/httpdocs/tiles/" . intval($_GET['z']) . "_" .
> intval($_GET['x']) . "_" . intval($_GET['y']) . ".png";
>
>    header("Content-Type: image/png");
>    header("Cache-Control: max-age=84600");
>
>    if (file_exists($filename)) {
>        header("Content-Length: " . filesize($filename));
>        readfile($filename);
>    } else {
>        readfile("/usr/www/httpdocs/clear.png");
>    }
>
> ?>
>
> Basically this PHP script will check to see if the file exists. If it
> does it will return the file. If it doesn't, it will return a 1px
> empty image, in this case called 'clear.png'. The only stuff you
> should need to change are the paths to clear.png and $filename. Be
> aware that PHP safe mode can probably screw this up.
>
> NOTE: counter-intuitively, PHP looks for the true file destination NOT
> the URL. So you need to know your servers C:// style path to the file.
> There are ways around it using fopen() but you would need to look
> those up - not realising this gave me headaches.
>
> 2.) Now, go into your map javascript and point to the PHP file instead
> of the image URL. Specify the zoom/x/y co-ords which we will detect
> using $_GET in our PHP script. If you don’t know what $_GET is have a
> look on google as its quite fundamental – but in basic terms you send
> variables and their values to a PHP document by appending the URL with
> the format “map.html/?var=value&othervar=value”. PHP then plucks those
> values and variables out for you to use.
>
> So, using the above example:
>
>   function createImageMapType(id) {
>     return new google.maps.ImageMapType({
>       getTileUrl: function(coord, zoom) {
>             return "/tilefinder.php?z=" + zoom + "&x=" + coord.x + "&y=" +
> coord.y;
>       },
>       tileSize: new google.maps.Size(256, 256),
>       isPng: true,
>           opacity: true
>     });
>   }
>
> I hope this helps. So far it seems to be working well on my site,
> there is a noticable improvement in load times and my Google PageSpeed
> score got pushed up by about 20-30 points. If you want to improve
> things further, I suggest setting a higher max-age (probably of 28
> days/2419200) and also adding a last modified content-type header.
>
> On Jul 30, 12:52 am, John Coryat  wrote:
>
> > On Friday, July 29, 2011 6:20:03 PM UTC-5, Jason wrote:
>
> > > Sorry for the noob question but does this require any other
> > > configuration changes (ie. htaccess)? I've included this in my
> > > index.html and it is still showing 404 errors in Chrome.
>
> > > Thanks
>
> > You'll have to be more specific. What did you try? What's the URL of your
> > map?
>
> > -John Coryat

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: i have CorelDrow map how can overlays it ??

2011-07-30 Thread Grok Lobster
You should convert it to tiles and present it as a custom map.

On Jul 29, 1:33 am, Sa3Q  wrote:
> Hi
>
> that's it in which  type i must save it to  overlays it on  the google
> maps. I don't to save it like  jpg or any  thing like this because the
> file size is 12MB and if i want to save it JPG it will be very large
> and appear not reliable.
>
> thank you

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: conversion to V3 questions

2011-07-30 Thread Pil
I'd consider it possible that Micosoft realized that they were on a
blind alley with this proprietary non-standard meta tag.

 wrote:
> I have two questions at the moment:
> 1) in V2 we had GUload in the body; inV# this gives an error; has V3 an
> replacement for GUnload?
> 2) I remember that in V2 we had to insert this statement:  http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />; do we need this in
> V# or does it have a replacement?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: conversion to V3 questions

2011-07-30 Thread Kesuke
1.) This guide should help explain how to call the map in V3:
http://code.google.com/apis/maps/documentation/javascript/tutorial.html

Essentially your map code will go in a javascript function, and in the
body tag you will call that function. In the 'hello world' example
over at that link you will see we usually call it  initialize(); but
you could rename it to whatever you want obviously provided both the
function and the call have the same name.

You don't need to call GUnload anymore, because map assets are (in
theory at least) dynamically cleared by the browser and the API as it
goes. Its a little bit contentious, you can read more about it at this
link if you really want, or just take my word for it:
http://code.google.com/p/gmaps-api-issues/issues/detail?id=772

2.) Per the 'hello world' example at the first link, you don't need to
include an IE7 standards mode meta-tag in V3 as far as I am aware.

On Jul 30, 4:36 pm, Nico Oudshoorn  wrote:
> I have two questions at the moment:
> 1) in V2 we had GUload in the body; inV# this gives an error; has V3 an
> replacement for GUnload?
> 2) I remember that in V2 we had to insert this statement:  http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />; do we need this in
> V# or does it have a replacement?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Geocoder fail

2011-07-30 Thread Rossko
> I was testing the geocoder and no matter what I type I can't get it to come
> back with the MEN Arena, Manchester, UK but if I put the same thing in the
> search on google maps it comes back with Manchester Evening News Arena,
> Manchester as expected.

It's a business/facility.  The geocoder searches postal addresses
only.  maps.google.com searches businesses too.  You might try the
Places API which includes businesses, institutions,. etc.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Reverse Geocoding does not works if I return the result in a function

2011-07-30 Thread Rossko
> Now I know where is the problem, can you give me a little example of
> code to store geocode's result in a variable (such as userPosition) ?

It's a useless undertaking ; the rest of your code will not know when
the variable has been populated in the callback function.
Do whatever you want to do with it inside the callback function.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Reverse Geocoding does not works if I return the result in a function

2011-07-30 Thread thebit
Well!
Now I know where is the problem, can you give me a little example of
code to store geocode's result in a variable (such as userPosition) ?
I have not good knoweledge about callback function.
Thanks.

On 30 Lug, 15:20, Rossko  wrote:
> > It seems this function was called after the rest of all the code.
> > Why?
>
> Because it is asynchronous.
>    geocoder.geocode( {'address': address}, function( ... ) { ... }
> only sends a request to Google.  The callback function is NOT run at
> this time.
> The browser then carries on and executes the code that follows.
> For example
>    geocoder.geocode( {'address': address}, function( ... ) { ... }
>    alert ('banana');
> the alert will display BEFORE the results get back from Google.
> Sometime later, the results come back and the callback function will
> be run.
>
> In the case of your code snippet, your callback refers to variables
> 'map' and 'addr' and 'userPosition' that may or may not be within the
> scope of the callback function when it runs, you need to be careful
> about that.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Geocoder fail

2011-07-30 Thread amnesia7
I was testing the geocoder and no matter what I type I can't get it to come 
back with the MEN Arena, Manchester, UK but if I put the same thing in the 
search on google maps it comes back with Manchester Evening News Arena, 
Manchester as expected.

Can someone give me a clue why this might fail.

Ta

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-maps-js-api-v3/-/I8-Hu_y5L4QJ.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] conversion to V3 questions

2011-07-30 Thread Nico Oudshoorn
I have two questions at the moment:
1) in V2 we had GUload in the body; inV# this gives an error; has V3 an 
replacement for GUnload?
2) I remember that in V2 we had to insert this statement: ; do we need this in 
V# or does it have a replacement?
 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-maps-js-api-v3/-/rYHM2Ax7kVAJ.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Bad requests on custom tile overlays

2011-07-30 Thread Kesuke
Correction, after deleting my firefox cache to see the full benefits
Google PageSpeed has gone from ~45/100 before these changes to
~90/100! Thats pretty solid stuff for a map with 1.5mb of data to load
just on initialize. It has also cut the number of 404s from ~100 on
load down to 0.

Furthermore, the benefits of setting longer max-ages on the files
reduces the actual transfer size for a second-visit down by over 50%
to 650kb. Obviously if you view a new area of the map you have to
download fresh tiles, but on startup it makes a big difference.

The PageSpeed addon did have a slight gripe with me feeding it the
same 1px clear.png image from different URLs but it doesn't seem to
appreciate that is the lesser of two evils. So I set a very long
expiry on the clear.png and PNGcrushed it down to a massive 69 bytes
and PageSpeed seems to be ignoring it now.


On Jul 30, 3:19 pm, Kesuke  wrote:
> Okay, thanks everyone – the PHP solution works great!
> So here is a guide for Jason or anyone else who stumbles across this;
>
> 1.) Make a new PHP file with the following code:
>
> 
>    $filename = "/usr/www/httpdocs/tiles/" . intval($_GET['z']) . "_" .
> intval($_GET['x']) . "_" . intval($_GET['y']) . ".png";
>
>    header("Content-Type: image/png");
>    header("Cache-Control: max-age=84600");
>
>    if (file_exists($filename)) {
>        header("Content-Length: " . filesize($filename));
>        readfile($filename);
>    } else {
>        readfile("/usr/www/httpdocs/clear.png");
>    }
>
> ?>
>
> Basically this PHP script will check to see if the file exists. If it
> does it will return the file. If it doesn't, it will return a 1px
> empty image, in this case called 'clear.png'. The only stuff you
> should need to change are the paths to clear.png and $filename. Be
> aware that PHP safe mode can probably screw this up.
>
> NOTE: counter-intuitively, PHP looks for the true file destination NOT
> the URL. So you need to know your servers C:// style path to the file.
> There are ways around it using fopen() but you would need to look
> those up - not realising this gave me headaches.
>
> 2.) Now, go into your map javascript and point to the PHP file instead
> of the image URL. Specify the zoom/x/y co-ords which we will detect
> using $_GET in our PHP script. If you don’t know what $_GET is have a
> look on google as its quite fundamental – but in basic terms you send
> variables and their values to a PHP document by appending the URL with
> the format “map.html/?var=value&othervar=value”. PHP then plucks those
> values and variables out for you to use.
>
> So, using the above example:
>
>   function createImageMapType(id) {
>     return new google.maps.ImageMapType({
>       getTileUrl: function(coord, zoom) {
>             return "/tilefinder.php?z=" + zoom + "&x=" + coord.x + "&y=" +
> coord.y;
>       },
>       tileSize: new google.maps.Size(256, 256),
>       isPng: true,
>           opacity: true
>     });
>   }
>
> I hope this helps. So far it seems to be working well on my site,
> there is a noticable improvement in load times and my Google PageSpeed
> score got pushed up by about 20-30 points. If you want to improve
> things further, I suggest setting a higher max-age (probably of 28
> days/2419200) and also adding a last modified content-type header.
>
> On Jul 30, 12:52 am, John Coryat  wrote:
>
>
>
> > On Friday, July 29, 2011 6:20:03 PM UTC-5, Jason wrote:
>
> > > Sorry for the noob question but does this require any other
> > > configuration changes (ie. htaccess)? I've included this in my
> > > index.html and it is still showing 404 errors in Chrome.
>
> > > Thanks
>
> > You'll have to be more specific. What did you try? What's the URL of your
> > map?
>
> > -John Coryat- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Bad requests on custom tile overlays

2011-07-30 Thread Kesuke
Okay, thanks everyone – the PHP solution works great!
So here is a guide for Jason or anyone else who stumbles across this;

1.) Make a new PHP file with the following code:



Basically this PHP script will check to see if the file exists. If it
does it will return the file. If it doesn't, it will return a 1px
empty image, in this case called 'clear.png'. The only stuff you
should need to change are the paths to clear.png and $filename. Be
aware that PHP safe mode can probably screw this up.

NOTE: counter-intuitively, PHP looks for the true file destination NOT
the URL. So you need to know your servers C:// style path to the file.
There are ways around it using fopen() but you would need to look
those up - not realising this gave me headaches.

2.) Now, go into your map javascript and point to the PHP file instead
of the image URL. Specify the zoom/x/y co-ords which we will detect
using $_GET in our PHP script. If you don’t know what $_GET is have a
look on google as its quite fundamental – but in basic terms you send
variables and their values to a PHP document by appending the URL with
the format “map.html/?var=value&othervar=value”. PHP then plucks those
values and variables out for you to use.

So, using the above example:

  function createImageMapType(id) {
return new google.maps.ImageMapType({
  getTileUrl: function(coord, zoom) {
return "/tilefinder.php?z=" + zoom + "&x=" + coord.x + "&y=" +
coord.y;
  },
  tileSize: new google.maps.Size(256, 256),
  isPng: true,
  opacity: true
});
  }

I hope this helps. So far it seems to be working well on my site,
there is a noticable improvement in load times and my Google PageSpeed
score got pushed up by about 20-30 points. If you want to improve
things further, I suggest setting a higher max-age (probably of 28
days/2419200) and also adding a last modified content-type header.


On Jul 30, 12:52 am, John Coryat  wrote:
> On Friday, July 29, 2011 6:20:03 PM UTC-5, Jason wrote:
>
> > Sorry for the noob question but does this require any other
> > configuration changes (ie. htaccess)? I've included this in my
> > index.html and it is still showing 404 errors in Chrome.
>
> > Thanks
>
> You'll have to be more specific. What did you try? What's the URL of your
> map?
>
> -John Coryat

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: JS files are not update when I save them

2011-07-30 Thread en4ce


for example

btw, check your .htaccess, could be that the server tells your browser
to not update the files ;)

normal this stuff looks like this:


ExpiresActive On
ExpiresByType image/x-icon "access plus 5184000 seconds"
ExpiresByType image/gif "access plus 5184000 seconds"
ExpiresByType image/jpg "access plus 5184000 seconds"
ExpiresByType image/jpeg "access plus 5184000 seconds"
ExpiresByType image/png "access plus 5184000 seconds"
ExpiresByType text/css "access plus 5184000 seconds"


# BEGIN Cache-Control Headers

  
Header set Cache-Control "max-age=5184000, public"
  
  
Header set Cache-Control "max-age=5184000, private"
  
  
Header set Cache-Control "max-age=216000, private"
  


On 28 Jul., 09:49, thebit  wrote:
> @geocodezip: the browser I use is FireFox
> @en4ce: can you explain me how I must to do to automatically reload FS
> files?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Reverse Geocoding does not works if I return the result in a function

2011-07-30 Thread Rossko
> It seems this function was called after the rest of all the code.
> Why?

Because it is asynchronous.
   geocoder.geocode( {'address': address}, function( ... ) { ... }
only sends a request to Google.  The callback function is NOT run at
this time.
The browser then carries on and executes the code that follows.
For example
   geocoder.geocode( {'address': address}, function( ... ) { ... }
   alert ('banana');
the alert will display BEFORE the results get back from Google.
Sometime later, the results come back and the callback function will
be run.

In the case of your code snippet, your callback refers to variables
'map' and 'addr' and 'userPosition' that may or may not be within the
scope of the callback function when it runs, you need to be careful
about that.


-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: Reverse Geocoding does not works if I return the result in a function

2011-07-30 Thread thebit
It's a strange event!
For example, I have the same problem in another function which
converts address -> coordinates
*
// creo la mappa a partire da un indirizzo passato come parametro o
quello di default
function searchAddress(addr)
{
var address;
if(addr == null)
address = 
document.getElementById("address").value;
else
address = addr;

var geocoder = new google.maps.Geocoder();
geocoder.geocode( {'address': address}, 
function(results,status)
{
if(status == 
google.maps.GeocoderStatus.OK)
{
if(addr == null)

map.setCenter(results[0].geometry.location);
else
{
userPosition = 
results[0].geometry.location;
alert("userPosition = " 
+userPosition);
}
}
else
{
alert("Error: " +status);
}
});
}

***
In this case I put the code (to store value in a variable) in "(status
== google.maps.GeocoderStatus.OK)" but it does not works!
It seems this function was called after the rest of all the code.
Why?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: JS files are not update when I save them

2011-07-30 Thread thebit


On 28 Lug, 13:47, "geocode...@gmail.com"  wrote:
>
> Try control-F5 to force reload your page (ignore the cache)
>
I yet tried to force page with ctrl+F5 (I yet wrote that in the first
post).
Only solution is to surf the full address to manually reload the file.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.