[Google Maps API v3] Level Switcher for Indoor Maps

2014-07-02 Thread Martin Kleppe
Is there a way to show a level switcher for indoor maps in the JavaScript 
Maps API? I can't find an option to display floor plans correctly.

On the website it says: … will also be available through the Google Maps 
APIs for use in your mobile applications or website. 

Maybe the feature was not released?

Cheers – Martin

-- 
You received this message because you are subscribed to the Google Groups 
Google Maps JavaScript API v3 group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-maps-js-api-v3+unsubscr...@googlegroups.com.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
Visit this group at http://groups.google.com/group/google-maps-js-api-v3.
For more options, visit https://groups.google.com/d/optout.


[Google Maps API v3] Re: Upcoming change: 3.10 becomes release version on November 15

2012-12-06 Thread Martin Kleppe
Hey Enoch,

one of our customers reported, that his app crashes after the API update.

Is there a way to force the load of v=3.8? We use an older version of 
Webkit that is not compatible with the latest updates.

Maybe there is a solution for business clients that use the Google Maps API 
internally.

Cheers – Martin


On Tuesday, November 6, 2012 4:44:30 AM UTC+1, Enoch Lau (Google Employee) 
wrote:

 We will be making the current experimental version (3.10) the default 
 version on or shortly after November 15, 2012. The versions will then be:

 Experimental: 3.11
 Release (default): 3.10
 Frozen: 3.9

 3.8 will be removed, and you will be provided with 3.9 if you request it.

 We encourage you to test your applications with 3.10 before November 15, 
 which you can do by adding v=3.10 when loading the Maps API. If you like 
 to live on the edge, you can add v=3.exp to always receive the current 
 experimental version with all of its latest features.

 For more information about Maps API versioning, see:

 https://developers.google.com/maps/documentation/javascript/basics#Versioning

 To report issues with any version of the API, see:
 http://code.google.com/p/gmaps-api-issues/issues/list
  

-- 
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/-/XAhyr7AqZgQJ.
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] Google custom streetview player failing with remote data source?

2012-12-06 Thread Jan Martin
Hi all,

please have a look at my Google custom streetview player implementation 
(simplified for testing): 
http://www.detestserver.de/sameserver/start.html
It works well as long as the player.js and the test.php file (for the links 
data etc.) are on the same server.

Data is still retrieved, but display fails when the test.php file is on 
another server: 
http://www.detestserver.de/differentservers/start.html
test.php then this:
http://www.usatestserver.com/differentservers/test.php?callback=callbackstreetview=20_=1354798106474

Using Firebug with Firefox one can see that the data still has been 
received and the format is valid:
http://www.detestserver.de/differentservers/different_servers_1.png
http://www.detestserver.de/differentservers/different_servers_2.png

I wonder what is wrong with the player?

Thanks.

All files can be found here:
same server example:
http://www.detestserver.de/sameserver/

different server example:
http://www.detestserver.de/differentservers/
http://www.usatestserver.com/differentservers/

-- 
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/-/JRDQLSBCsr4J.
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: Android or Google Maps API bugs?

2012-11-14 Thread Martin
Reported as an issue:

http://code.google.com/p/gmaps-api-issues/issues/detail?id=4552

Martin.


On Tuesday, November 13, 2012 2:41:23 AM UTC, Enoch Lau (Google Employee) 
wrote:

 It could be a bug in the browser, but the Maps API tries as much as 
 possible to work around browser bugs. Please file an issue on the issue 
 tracker: http://code.google.com/p/gmaps-api-issues/issues/list

 On Friday, November 9, 2012 11:14:54 PM UTC+11, Martin™ wrote:

 It looks as though the Google Maps API has a bug when viewed in an 
 android ICS browser. 
 I've tried a few maps now and find that the stock android ICS browser 
 (and SDK WebView) fail to properly render the pegman when dragged onto 
 the map. 

 Take a look at this screengrab: http://i.imgur.com/qWzqR.jpg 
 When the pegman is dragged the entire pegman sprite image gets 
 displayed. 
 (http://maps.gstatic.com/mapfiles/cb/mod_cb_scout/ 
 cb_scout_sprite_api_003.pnghttp://maps.gstatic.com/mapfiles/cb/mod_cb_scout/cb_scout_sprite_api_003.png)
  


 We noticed this first using an SDK WebView on an ICS device, so i then 
 tried the default android ICS browser on the official example page at: 

 https://google-developers.appspot.com/maps/documentation/javascript/examples/streetview-map
  
 Again the entire pegman image is displayed when dragging the pegman 
 instead of just a single pegman sprite. 
 With the android hardwareAccelerated app attribute set to false there 
 is another rendering problem on the example page - the single Marker 
 is rendered twice. 
 (When set to true only the pegman problem seems to occur). 
 Again the image i linked to shows the problem better than i can 
 explain. 

 Is this an android bug or a Google Maps API bug? 
 Any ideas - shall i start a new  issue (it seems to not yet have been 
 reported by anyone else). 

 Thanks. 

 Martin. 



-- 
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/-/UH39rANCA-gJ.
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] Android or Google Maps API bugs?

2012-11-09 Thread Martin
It looks as though the Google Maps API has a bug when viewed in an
android ICS browser.
I've tried a few maps now and find that the stock android ICS browser
(and SDK WebView) fail to properly render the pegman when dragged onto
the map.

Take a look at this screengrab: http://i.imgur.com/qWzqR.jpg
When the pegman is dragged the entire pegman sprite image gets
displayed.
(http://maps.gstatic.com/mapfiles/cb/mod_cb_scout/
cb_scout_sprite_api_003.png)

We noticed this first using an SDK WebView on an ICS device, so i then
tried the default android ICS browser on the official example page at:
https://google-developers.appspot.com/maps/documentation/javascript/examples/streetview-map
Again the entire pegman image is displayed when dragging the pegman
instead of just a single pegman sprite.
With the android hardwareAccelerated app attribute set to false there
is another rendering problem on the example page - the single Marker
is rendered twice.
(When set to true only the pegman problem seems to occur).
Again the image i linked to shows the problem better than i can
explain.

Is this an android bug or a Google Maps API bug?
Any ideas - shall i start a new  issue (it seems to not yet have been
reported by anyone else).

Thanks.

Martin.

-- 
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: right click drop down menu for adding destination on selected route 2 posts by 2 authors in Google Maps

2012-05-18 Thread Martin
If i understand you correctly then just disregard my comment Where
MyPolyline is a reference to the Polyline drawn by the
DirectionsRenderer.

Just add the event listener to the straight polyline and it should
work as desired.

Martin.

On May 17, 5:46 am, Munna jaiswalsail...@gmail.com wrote:
 Thank You Martin for your valuable investigation. One concern, ask what I
 tried/observed is polylines are straight lines connecting markers, but they
 won't follow the road as direction service do.







 On Thursday, April 12, 2012 11:38:03 AM UTC+5:30, Martin™ wrote:

  Look at the source code for the ContextMenu example.

  google.maps.event.addListener(map, 'rightclick', function(mouseEvent){
          contextMenu.show(mouseEvent.latLng);
  });

  It's activated by a right click on the Map, a right click on a
  Polyline is NOT detected.

  Now look at the documentation for the Polyline:

 https://developers.google.com/maps/documentation/javascript/reference...

  Look under Events and you will see that a Polyline has a 'rightclick'
  event just like the Map.
  So you'll want to try something like this:

  google.maps.event.addListener(MyPolyline, 'rightclick',
  function(mouseEvent){
          contextMenu.show(mouseEvent.latLng);
  });

  Where MyPolyline is a reference to the Polyline drawn by the
  DirectionsRenderer.

  Martin.

  On Apr 11, 6:02 pm, Munna jaiswalsail...@gmail.com wrote:
   Thank you for your help. But the context menu is not working on route,
   elsewhere working. Using this I can't replicate the google maps add
   destinations on/outside the selected route.

   Please help

   On Mar 26, 2:09 pm, MymsMan bobbux...@gmail.com wrote:

I haven't tried it myself but this thread shows a sample right click
context menuhttps://
  groups.google.com/d/topic/google-maps-js-api-v3/8mfN4FvZ4kk/d...

Bob

On Sunday, 25 March 2012 03:25:18 UTC+1, Munna wrote:

 Hi,

 I'm trying to write the code to add destination on selected route
  same
 as we do in google maps. When I create a route, I should able to add
 destination by right clicking on the path(created using
 directionService). Should able to add some additional information
 like  wait time at that destination and all should be sent to
  database
 for future reference. Also there should be a option to add
  destination
 through input field as well.

 That means I want to replicate what you see on google maps home.

 Please provide the help/script. I'm looking for this solution on
 google for last 1 month. I've posted it on experts-exchange.com 
 stackoverflow.com but no luck. Please please please please please
  help
 me..

 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: Maps on Android

2012-03-28 Thread Martin
You are not limited to Google's own MapView, there are third party
Android libraries too:

http://wiki.openstreetmap.org/wiki/Android

It seems that Google treat Android MapView updates as a very low
priority, see this thread:

https://groups.google.com/group/android-developers/browse_frm/thread/faeeb399c5ed5b5f/76b4fb699986825c?hl=enlnk=gstq=google+maps#

Post #5 says:

The Google Maps add-on has essentially been abandoned. It has not
received
an update of any sort in several years now. I would think that the
tiles
would be updated server-side, but apparently that is also not a
concern for
Google at this time. Not much you can do about this. 

I'm using OSMDroid: http://code.google.com/p/osmdroid/

It also lacks many features that the javascript API v3 has, but it's
source code is available and you can (in theory) create whatever
features you require.

It's PathOverlay class can be used to draw a Polyline or Polygon.

http://android.martinpearman.co.uk/osmdroid/documentation/native_android_library/index.html?org/osmdroid/views/overlay/PathOverlay.html

Use it's setPaint() method to set the Paint.Style:

http://developer.android.com/reference/android/graphics/Paint.Style.html

I don't know if the Google MapView has an equivalent to PathOverlay.

Martin.


On Mar 27, 7:45 pm, sgiddings mr.s.giddi...@gmail.com wrote:
 Thank you for your reply Barry,

 However, how can I reproduce other aspects such as line, polyline and
 polygon drawing based on lat/lng coordonnates ?

 Are there any full examples for creating real world mapping applications in
 the same manner as with the v3 javascript api ?

-- 
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] Thoughts on how to Cache this Google Map

2012-02-20 Thread Stephen Martin
Thoughts on how to do this.

We created this
http://www.tournament.co.nz/carpark-locations/38/

The Process works well - All is nice and smooth - The problem is when
someone has done a search and gone through in to an individual car
park page and they hit back. The Map/ Search resets so they have to
start again. As opposed to retaining there last search in a cookie or
something.

Any thoughts on how this could be done? The Map is based on Simple
Maps Plugin for WP just quite modified.

http://screencast.com/t/Vh7czW4V




The winner of the Challenge: $20 USD To your Paypal account to the
first person to give me a Workable solution as my developers are not
100% on how to get this to work.

-- 
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] route instructions is skipping locations

2012-02-10 Thread martin
Hi

I have developed a maps site in which the user can create routes (up
to 8 destinations).
The route is generated as a map and a route description.
I use the DirectionsService to do this.

My problem is: A location is sometimes skipped by the steps
instructions.
The instructions of the route are correct but it does not return:
you've reached point  x.
When 2 locations are really close to each other, one of the two will
usually be skipped.

Does anyone recognize this problem?

thanks
Martin

-- 
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: streetview: setPosition or map.setStreetView ?

2012-02-07 Thread martin
Figured it out, thanks

On Feb 6, 8:58 am, martin mwcourte...@yahoo.com wrote:
 I am using streetview that is pointing in one particular direction to
 mark the location of a Trail Head, this is working very well using
 API 2.2 but in version 3.0 the direction is off by a few degrees and
 in some cases 90 degrees.
 I have live examples and in each example they load streetview.js

 API 2.2 is here:http://www.courtenay.ca/parks/index.html

 and API 3 is here:http://www.courtenay.ca/parks/index3.html

 note: the map uses Simile Exhibit, in order to see the streetview
 click on a marker then you will see the StreetView link

 am I using the
 myPano.setPov(myPoint,{heading: mpov, pitch: +14, zoom: 1});
 incorrectly? If I change the value of the Pitch it doesn't really
 change...
 thanks in advance for any help

-- 
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] streetview: setPosition or map.setStreetView ?

2012-02-06 Thread martin
I am using streetview that is pointing in one particular direction to
mark the location of a Trail Head, this is working very well using
API 2.2 but in version 3.0 the direction is off by a few degrees and
in some cases 90 degrees.
I have live examples and in each example they load streetview.js

API 2.2 is here:
http://www.courtenay.ca/parks/index.html

and API 3 is here:
http://www.courtenay.ca/parks/index3.html

note: the map uses Simile Exhibit, in order to see the streetview
click on a marker then you will see the StreetView link

am I using the
myPano.setPov(myPoint,{heading: mpov, pitch: +14, zoom: 1});
incorrectly? If I change the value of the Pitch it doesn't really
change...
thanks in advance for any help

-- 
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: Grid overlay on to map

2012-01-27 Thread Martin
If performance is important then i'm sure you'll find a custom overlay
map type to be better than client side polyline or polygon rendering.

Here's the reference page:

http://code.google.com/apis/maps/documentation/javascript/maptypes.html#OverlayMapTypes

I daresay that creating a PHP script that uses gdlibrary to generate
and cache tiles would be the best approach.

www.google.co.uk/search?q=php+gd+library

Martin.


On Jan 27, 4:55 pm, teja tejasu...@gmail.com wrote:
 I will try this...but Im still a bit worried about the number of polygons i
 would need to render when Im at the lowest zoom level.
 Each of my polgon has 1 minute difference in lat and lon. So at the highest
 zoom I would need to draw around 60(lat minutes)*60(long
 minutes)*100(degrees I cover on the whole)...36 polygons :D
 Please let me know if you did kindof thing anytime.

 Thank you
 On Fri, Jan 27, 2012 at 11:29 AM, Joseph Elfelt josephelf...@gmail.comwrote:









  Sorry, I don't know the answer to your question about tiles.

  I would still be tempted to address your task by
  1.  Build polyline grid
  2.  Analyze the polylines to build 4 corners for each grid box
  3.  Build polygons using the 4 grid box corners
  4.  Use API geometry library to get center of each grid box ( project
  50% of the way between opposite corners)
  5.  Color the grid box polygon based on grid box center

  --
  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.

 --
 Tejaswi Kumar |  5154220202
 Masters (Computer Science)
 North Carolina State University.

-- 
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: Since today performance problem when using own map type

2012-01-26 Thread Martin
Hi Enoch.

I don't want want to hijack this thread but you might want to take a
look at this map:

http://code.martinpearman.co.uk/deleteme/my_overlay_map/

It's an overlay map types that refreshes every 10 seconds.

Originally it refreshed itself smoothly in all browsers but recently
someone pointed out that the latest Chrome is very slow to initially
load the tiles and then very slow to update the tiles on a refresh.

In any browser other than Chrome it stills loads and updates smoothly
and quickly.

Martin.





On Jan 25, 4:37 pm, Enoch Lau (Google Employee)
enoch...@google.com wrote:
 Can you create a demo that illustrates this slowness please? Which browser
 / OS are you using?

 Enoch

-- 
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: Since today performance problem when using own map type

2012-01-26 Thread Martin
Let me add that i am using 64bit Windows 7 here.

Martin.

On Jan 26, 11:03 am, David david.gonzalez.gutier...@gmail.com wrote:
 Hi,

 Just to share my experience: I have also been experiencing slow performance
 problems with Chrome when refreshing the custom map tiles of the page
 posted by Martin.
 I am running the last version of Chrome with no extensions, on Windows 7
 Professional 64 bits. Other browsers (Opera and Firefox, in my case) work
 with no problems at all.

 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: Since today performance problem when using own map type

2012-01-25 Thread Martin
Are you experiencing this with Chrome only by any chance?

I've recently seen Chrome rendering custom maps very slowly but other
browsers render the same custom maps perfectly.
The same custom maps previously (not sure how long ago) worked fine
with Chrome.

Martin.


On Jan 25, 10:33 am, NoRyb phrei@gmail.com wrote:
 Hello

 I created my own base map type which does nothing but implement the getTile
 function like so:

     var div = ownerDocument.createElement('DIV');

      div.style.width = this.tileSize.width + 'px';
      div.style.height = this.tileSize.height + 'px';
      return div;

 But since today, it takes ages to load the tiles after I set the mapTypeId
 when zooming in to zoomlevel 20 (before was maptypeid satellite).

 Did anything in the last 24 hours?

 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: Refresh Base Map Type Tiles

2012-01-20 Thread Martin
The only thing i can see that would work would be to use a solution
similar to that which i posted in post #4 of the thread i linked to
previously:

https://groups.google.com/group/google-maps-js-api-v3/browse_frm/thread/25a3f290cdf0fa5e/34d32ac679be539c?hl=enlnk=gst

Add a bogus parameter to your tile URLs and when you want to refresh
the tiles just remove and then re-add the tile layer.
A time based bogus parameter will ensure new tiles are requested
instead of cached tiles being reused.



That will not be visually smooth but should work. :-(

Can you not implement your tile layer as a BaseMapType?

http://code.google.com/apis/maps/documentation/javascript/maptypes.html#BaseMapTypes

Map types which you construct in this manner may either stand alone
or be combined with other map types as overlays. Standalone map types
are known as base map types.

Martin.


On Jan 20, 7:40 am, NoRyb phrei@gmail.com wrote:
 Hello Martin

 Thank you for the answer. Unfortunately this does not help me as I don't
 have a list of tiles. I extended the ImageMapType so I can use it as Base
 Map instead of overlay map. There I only get the getTileUrl-Callback which
 does not have a pointer to the tile (only the URL).

 Is there a way to get to the Tiles over the map object so I can iterate
 through them?

-- 
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: Change zoomMax of built-in Map Type

2012-01-20 Thread Martin
Could you listen for the Map 'zoom_changed' event.

If the map is zoomed to 21 or more then change to your custom map, if
zoom changes to less than 21 display the satellite map type.

Martin.


On Jan 19, 3:43 pm, NoRyb phrei@gmail.com wrote:
 Hello!

 I would like to change the zoomMax-Property of a built-in Map Type
 (Satellite). I found a post in a googlegroup in September 2011 where a
 google employee reported that this was possible again. Now it seems that
 it's not.

 The reason I need to do this is because I create an own Base Map Type. It
 should start right at zoomlevel 21. So you have the satellite map until 20
 and if you zoom in, it switches to my own map type. The thing is, that
 because of maxZoom on Satellite I'm not able to go over this border.

 Any suggestions how I could solve that?

 Thank you very much

-- 
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: Refresh Base Map Type Tiles

2012-01-19 Thread Martin
Here's a thread that may prove useful:

https://groups.google.com/group/google-maps-js-api-v3/browse_frm/thread/25a3f290cdf0fa5e/34d32ac679be539c?hl=enlnk=gst

Martin.


On Jan 19, 12:19 pm, NoRyb phrei@gmail.com wrote:
 Hello! I would like to know if it's possible to refresh or update a
 MapType. I'm using an ImageMapType to display custom tiles. If I change a
 parameter, I want to display another set of tiles - how do I accomplish
 this?

 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: rightclick event inside a circle

2012-01-18 Thread Martin
Hi.

Could you add an API event listener for the Map 'mousemove' event:

http://code.google.com/apis/maps/documentation/javascript/reference.html#Map

google.maps.event.addListener(myMap, 'mousemove', function(mouseEvent)
{
 lastMousePosition=mouseEvent.latLng;
});

lastMousePosition would have to be defined as a global variable in
your code.

Then add a DOM event listener for the mouse right click event.

Whenever the DOM event is triggered you will have the last mouse
position available.

Or does the API 'consume' the right click event so it will not
propogate to your DOM listener?

Martin.


On Jan 18, 12:58 pm, Eduardo duduweil...@gmail.com wrote:
 hello,

 i am working in a system and I need to create a custom context menu when
 the user right click *inside* a circle. i have noticed that a right click
 on the map triggers an event with the XY position defined, and then I can
 create a menu for the map. But when the rightclick is inside a circle, the
 event doesn't have the XY position, and I can't show the menu at the right
 position!!

 anyone knows how to get the screen XY position when the click event is
 triggered?!

-- 
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: How to add a custom control on latlng position, not corners

2012-01-16 Thread Martin
Or create a custom overlay:

http://code.google.com/apis/maps/documentation/javascript/overlays.html#CustomOverlays

Martin.


On Jan 15, 10:41 pm, xelawho xela...@gmail.com wrote:
  Any advice?

 have you looked at 
 labels?http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerw...

-- 
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: How to paint an arrow?

2012-01-13 Thread Martin
Hi.

Use a Marker with a custom icon (your arrow image):

http://www.svennerberg.com/2009/07/google-maps-api-3-markers/

Martin.


On Jan 13, 7:18 pm, bstaros...@koptevo.net bstaros...@koptevo.net
wrote:
 I need to put arrow on the map - for example, to show military strike
 direction.

 In theory, I can paint it by three lines or by two lines and narrow
 triangle. But this require some mathematics.

 May be,
 there is a library which can paint arrows?

-- 
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: First click on directions way point not working

2012-01-10 Thread Martin
I have already reported this as a bug:

http://code.google.com/p/gmaps-api-issues/issues/detail?id=3738

Looks like my report has been ignored!

Μartin.


On Jan 10, 6:32 pm, kronus tam200...@gmail.com wrote:
 Hi guys and thanks for being here to help us.

 Here's the app that I am working on 
 --http://kronusproductions.com/test_dg/first.php

 You can either click on the Acton school district (only five schools
 so it will not take long to load)

 or you can go 
 directlyhttp://kronusproductions.com/test_dg/first.php?schoolid=2districtNam...

 After the five markers have loaded and the bounds set, click on the
 'VASQUEZ HIGH' marker, which will fill the destinations text field.

 I test with the address of '11030 Hartsook St, North Hollywood, CA' in
 the start text field, followed by clicking on the Get Directions
 button, which will produce the directions perfectly.

 When I click on Lankershim in the first way point (is that what it is
 referred as?), then the map goes to some obscure location, but if I
 click a second time, then it works.

 I have tested on both Mac  Win (Safari, FF, Opera, IE)

 Is there anything I can do on my end?

 Thanks in advance

-- 
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] KmlLayers and Polygons

2012-01-04 Thread Martin Samm
i seem to be going round in circles and cant find an answer to this.
I'm adding a KmlLayer to a map, reading in a series of Placemarks (each of 
which contains MultiGeometry/Polygon) definitions. There are lots of 
placemarks.
I need to do 2 things:
1. Once the layer has loaded, colour some of the polygons (i.e. go through 
the polygons and set a fill colour for some)
2. when a click is performed, detect which (if any) polygon it is inside.
Is this possible? If so, how?
Many thanks
Martin 

-- 
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/-/izzZ-m_kXwAJ.
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: Is it possible to make the default google map marker smaller?

2012-01-02 Thread Martin
Here's a tutorial showing how to use your own images as custom icons:

http://www.svennerberg.com/2009/07/google-maps-api-3-markers/

Martin.


On Jan 2, 2:22 pm, roy lao rla...@gmail.com wrote:
 Dear all,

 I am creating a map with a lot of data posted on it, wondering if it is
 possible to shrink down the google map default marker, so as to allow more
 markers being shown.

 Is it possible? Or any alternative to realize this?

 Many thanks!
 Roy

-- 
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: The navigator is very slow with two hundred markers

2011-12-09 Thread Martin
Maybe you've inadvertently disabled the newer canvas Markers and are
getting the older DOM markers...?

https://groups.google.com/group/google-maps-js-api-v3/browse_frm/thread/ac0d90c91ecec6a0/61a9540092badcf8?hl=enlnk=gst

Martin.


On Dec 9, 8:53 am, angelcr angeldelacalleraba...@gmail.com wrote:
 Hello,

 I am moving existing markers. I have an array of javascript's object.
 Every object has a marker and I use the setPosition function when data
 are received from server.

 I will check the asset tracking section.

 Thanks

 On 9 dic, 02:14, Luke Mahé lu...@google.com wrote:







  Are you adding new markers every time or are you moving existing markers?

  Also I recommend that you check that you are following the Terms of
  Service, particularly the asset tracking section (10.2 c iii)

  -- Luke

  On Fri, Dec 9, 2011 at 2:02 AM, angelcr 
  angeldelacalleraba...@gmail.comwrote:

   Hi,

   I'm developing an web application based in api google maps v3. I have
   a setInterval in js that gets marker's position (vehicles) every 5
   seconds from server. When I have more 200 markers is necessary many
   ram memory and the navigator (ie, chrome, firefox) is very slow. I
   don`t know if I use much time in setInterval process (20 seconds for
   example) could help me.

   If you have any idea how fix the problem?

   Thanks and sorry for my english !!
   Regards
   Angel

   --
   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.

-- 
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: How to store and update the unique ID for a place?

2011-12-08 Thread Martin Brehme
Did you solve this problem? I have nearly exact the same issue? It would 
help to know how often the id is updated by google...!?

-- 
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/-/p7niAy_IqEwJ.
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: Open a menu when rightclick

2011-12-07 Thread Martin
Hi.

Take a look at the 'ContextMenu' library i created:

http://code.martinpearman.co.uk/googlemapsapi/contextmenu/

http://code.martinpearman.co.uk/googlemapsapi/contextmenu/1.0/docs/

And the advanced demo map:

http://code.martinpearman.co.uk/googlemapsapi/contextmenu/1.0/examples/advanced_example.htm

You should be able to construct a custom context menu that appears as
you want - and generates events that your map can listen and respond
to.

Martin.


On Dec 7, 4:47 am, Juan Francisco Vega Damke crusi...@gmail.com
wrote:
 Hello, I'm a noob in Gmaps API, I want to know how can I do this, I can't
 find info about this.
 Also if is possible, I need to know how to add a new option

 Thanks you so much,
 Regards from Chile!

 *Be the change you want to see in the world *

  menu.png
 116KViewDownload

-- 
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: Map mousemove event not firing when move on overlays

2011-11-30 Thread Martin
Hi.

Ideally the API would give us an option to select whether Overlays
consume the mousemove event.

Maybe one of us should start a feature request?

Martin.



On Nov 30, 11:48 am, Nianwei Liu nian...@gmail.com wrote:
 It's not unusual that the app may require the overlay clickable AND
 map mousemove event available.
 The map.mouseevent documentation did not say anything about this, if
 it did, it would be something strange, like: event may not be
 reliable if you want use clickable overlay.
 I'd argue that overlay absorb the mouse event is not the correct
 behavior, especially mousemove events, which are typically used for
 background tasks.
  For click event it is more acceptable to absorb the click event for
 underneath overlays because you did not really click the underneath
 overlay if some other overlay is on top (if we let opacity out of the
 argument). However, even in that case, the Map, not the lower overlay,
 should still receive the event.

-- 
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: Map mousemove event not firing when move on overlays

2011-11-29 Thread Martin
Hi.

I reported much the same a month or so back:

https://groups.google.com/group/google-maps-js-api-v3/browse_frm/thread/98cd2607d15cc805/3f6725964190a6a0?hl=enlnk=gstq=martin+event+consume#3f6725964190a6a0

Martin.

On Nov 29, 9:24 pm, Nianwei Liu nian...@gmail.com wrote:
 This is rather unexpected for the API.
 The map's mousemove event is not firing when the mouse is moving on
 top of some overlay.  I know in V2 this does not happen so I can
 display coordinates as mouse move.
 If this behavior by design for v3 that would be really bad for some
 apps. Caught me by surprise while trying to debug something and
 eventually trace down to this problem.

 Test 
 page:http://gmaps-utility-gis.googlecode.com/svn-history/r375/trunk/v3test...

-- 
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: Add two marker with click on the map is draggable direction

2011-11-26 Thread Martin
You could try my ContextMenu:

http://code.martinpearman.co.uk/googlemapsapi/contextmenu/1.0/examples/advanced_example.htm

Let the user choose a location with a right-click, add a draggable
Marker to the location and the user can fine tune the location by
dragging the Marker.

Documentation can be found here:

http://code.martinpearman.co.uk/googlemapsapi/contextmenu/1.0/

Martin.


On Nov 25, 3:01 pm, Map smurfs Earth map.smurfs.ea...@gmail.com
wrote:
 Hi all,

 im working on after the map is load, user able to *add two marker with
 click on the map  is draggable direction*.
 i has search online example been so long and i can't find it.

 Anyone can help, any sample or source code for it, desperate now. 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: How to add a domready event to an infoBubble

2011-11-23 Thread Martin
Hi.

It might be that the 'domready' event fires BEFORE your next line of
code which adds an event listener for that event.
(The event happens before you listen for it).

Try adding the domready event listener before opening the InfoBubble:

var infoWindow = new InfoBubble({content: request.responseText,
maxWidth: 1000, position: latLng, arrowSize: 0, maxHeight: 600});
google.maps.event.addListener(infoWindow, domready, function()
{load_rotator();});
infoWindow.open(map);

Martin.


On Nov 23, 4:03 pm, Geoff Schultz geoffrey.w.schu...@gmail.com
wrote:
 I've been using infoWindows, but due to the desire to change the
 layout of the infoWindow, I'm trying to switch to an infoBubble.
 However, the domready event isn't executing like it did for the
 infoWindow.  I'm a javascipt hacker, so please explain this to me in
 terms that a hacker can understand.

 Here's the code that I'm using:

 var infoWindow = new InfoBubble({content: request.responseText,
        maxWidth: 1000, position: latLng, arrowSize: 0, maxHeight:
 600});
 infoWindow.open(map);
 google.maps.event.addListener(infoWindow, domready, function()
 {load_rotator();});

 Thanks in advance!

 -- Geoff

-- 
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] ContextMenu

2011-11-21 Thread Martin
Hi all.

I've recently had to develop a context menu for a Google Maps API v3
map and decided that i'd share it with you all.

I searched and found no v3 context menu so hope this will be useful to
others.

Main project page:

http://code.martinpearman.co.uk/googlemapsapi/contextmenu/

Advanced example page:

http://code.martinpearman.co.uk/googlemapsapi/contextmenu/1.0/examples/advanced_example.htm

As always - constructive comments welcomed!

Thanks.

Martin.

-- 
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: Inconsistent browser behavior when opening URLs directly from marker

2011-11-21 Thread Martin
Hi.

Look at the syntax of the window open method:

http://www.w3schools.com/jsref/met_win_open.asp

Have you experimented with the 'name' attribute to see if you can get
the behaviour you desire?

Martin.


On Nov 22, 7:00 am, Roger Ertesvag webfo...@webfokus.no wrote:
 Marcelo,
 while windows.open may not be cross browser, the issues here does not occur
 when used outside of Google maps. I have added a regular link using
 window.open to the example page, this opens in the foreground regardless of
 which browser is used.

 Roger

-- 
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: In v3 version, how to realize the map in drag to finish the dynamic data exchange, to get the new area of marker information?

2011-11-16 Thread Martin
Hi.

http://code.google.com/apis/maps/documentation/javascript/reference.html#Map

Add an event listener listening for the Map 'bounds_changed' event.

Martin.

On Nov 16, 8:38 am, biao li biao...@gmail.com wrote:
 In the API I didn't find the corresponding 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] Bug with DirectionsService and text links.

2011-11-15 Thread Martin
Hi all.

The first click on a text link in the text based directions panel
fails to correctly pan and zoom the map and open the infowindow.

More details here:

http://code.google.com/p/gmaps-api-issues/issues/detail?id=3738

Martin.

-- 
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: Visibility toggle of map container in 3.7 causing error in IE7 and IE8

2011-11-15 Thread Martin
Hi.

I don't have a solution but this issue was reported just over a week
back, see this thread:

https://groups.google.com/group/google-maps-js-api-v3/browse_frm/thread/27def24e7007f8cc?hl=en#

Martin.


On Nov 16, 7:24 am, mx markxbrad...@gmail.com wrote:
 Using IE7 or IE8 take a look at:

 http://stores.petsmart.com/result-details.php?store=377

 Then click the Show Map, wait for the map and marker to render, then
 click the Hide Map link. IE7 and IE8 will display an error when the
 map container visibility is changed to: none.

 I am using prototype.js to toggle visibility of the map container DIV.
 The Show Map link works fine because the map is toggled to being
 visible, and the GMap API an determine the width and height of the map
 container. When the map is toggled to invisible, (clicking the Hide
 Map link), the GMap API can no longer determine the width and height
 of the map container and throws an error. If I use a call to the
 static map version 3.4 this error does not occur. Is there a way to
 stop the toggle of visibility of the map container from firing an
 event to the API? This error does not occur with other browsers,
 including IE9.

 *search terms: Internet Explorer 7 | Internet Explorer 8

-- 
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: ImageMapType issue?

2011-11-09 Thread Martin
Can you post a link to an online version of your code - there's no way
to debug a code dump.

Martin.


On Nov 9, 7:47 am, Map Guy rclair...@gmail.com wrote:
 Thank you for your reply. Good catch.

 I added tileSize: new google.maps.Size(256, 256),

 But I still seem to be running into the same issue. Any ideas?

 Complete text:

 !DOCTYPE html
 html
 head
 titleGoogle Maps JavaScript API v3 Example: Styled MapTypes/title
 link href=http://code.google.com/apis/maps/documentation/javascript/
 examples/default.css rel=stylesheet type=text/css /
 script type=text/javascript src=//maps.googleapis.com/maps/api/js?
 sensor=false/script
 script

 var map;
 var brooklyn = new google.maps.LatLng(40.6743890, -73.9455);

 var MY_MAPTYPE_ID = 'hiphop';

 function initialize() {

   var stylez = [
     {
       featureType: road,
       elementType: geometry,
       stylers: [
         { hue: -45 },
         { saturation: 100 }
       ]
     },
     {
       featureType: landscape,
       elementType: geometry,
       stylers: [
         { hue: #00 },
         { saturation: 75 },
         { lightness: -100}
       ]
     }
   ];

   var mapOptions = {
     zoom: 12,
     center: brooklyn,
     mapTypeControlOptions: {
        mapTypeIds: [google.maps.MapTypeId.ROADMAP, MY_MAPTYPE_ID]
     },
     mapTypeId: MY_MAPTYPE_ID
   };

   map = new google.maps.Map(document.getElementById(map_canvas),
       mapOptions);

   var styledMapOptions = {
         getTileUrl: function(coord, zoom)
                         {
                            return http://foo.com/foo.png;;
                         },
     tileSize: new google.maps.Size(256, 256),
     name: Hip-Hop
   };

   var jayzMapType = new google.maps.ImageMapType(styledMapOptions);

   map.mapTypes.set(MY_MAPTYPE_ID, jayzMapType);}

 /script
 /head
 body onload=initialize()
   div id=map_canvas style=width: 640px; height: 480px;/div
 /body
 /html

 On Nov 8, 11:36 pm, Martin™ warwo...@gmail.com wrote:







  Hi.

 http://code.google.com/apis/maps/documentation/javascript/maptypes.ht...

  Looks like you've not defined a (required) 'tileSize' property in your
  options.

  Martin.

  On Nov 9, 6:20 am, Map Guy rclair...@gmail.com wrote:

   Starting with this example:

  http://code.google.com/apis/maps/documentation/javascript/examples/ma...

   Changing:

   var jayzMapType = new google.maps.StyledMapType(stylez, styledMapOptions);

   To

   var jayzMapType = new google.maps.ImageMapType(styledMapOptions);

   Where: (getTileUrl is the addition)

     var styledMapOptions = {
    getTileUrl: function(coord, zoom)
      {
         return http://foo.com/foo.png;;
      },
       name: Hip-Hop
     };

   Results in (IE):

   Message: Expected value implementing google.maps.MapType
   Line: 1
   Char: 28
   Code: 0
   URI:http://maps.gstatic.com/intl/en_us/mapfiles/api-3/7/0/main.js
   Is there something basic I'm missing here or is this a bug?

   Thanks- 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: ImageMapType issue?

2011-11-09 Thread Martin
Hi again.

Look at the documentation for ImageMapType:

http://code.google.com/apis/maps/documentation/javascript/maptypes.html#ImageMapTypes

See that you create your ImageMapType and then insert it into the
Map's overlayMapTypes array.

That's different to creating a StyledMapType.

If you want an ImageMapType then why not just start with the demo code
i linked to above?

Note that if you click the View example link for that demo code it
redirects to:

http://code.google.com/apis/maps/documentation/javascript/examples/maptype-image.html

That's not the demo page code!

The link you posted has an error too.
It's encoding is UTF-16LE and i think has been saved with a Unicode
signature (BOM) which seems to prevent the API from loading.
Might just be a problem with dropbox and not a problem with your
original code.

Martin.


On Nov 10, 2:19 am, Map Guy rclair...@gmail.com wrote:
 Apologies, I thought it would be easier to make changes if I supplied the
 file in email.

 Here it is online:

 http://dl.dropbox.com/u/48944369/goog.html

 If there is a beer fund, I'll happily contribute :)

-- 
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: ImageMapType issue?

2011-11-09 Thread Martin
Hi.

Look at the documentation again in more detail.

http://code.google.com/apis/maps/documentation/javascript/maptypes.html#MapTypeInterface

Base Map Types
Map types which you construct in this manner may either stand alone or
be combined with other map types as overlays. Standalone map types are
known as base map types.

Overlay Map Types
Some map types are designed to work on top of existing map types. Such
map types may have transparent layers indicating points of interest,
or showing additional data to the user.

Image Map Types
Note that this map type is inserted into the map's overlayMapTypes
array.

So you can create a standalone new map type or a map type that
displays on top of other standalone map types.

It sounds to me as if you want to create an OverlayMapType?

Martin.


On Nov 10, 6:19 am, Map Guy rclair...@gmail.com wrote:
 Good call about the BOM. Fixing that seems to have got me past some
 issues...

 I think I may be confusing Layers with MapTypes?

 The reason I started with the StyledMapExample is the example had the
 appearance of something being an overlay on Roadmap.

 Now, when I made changes to Moon in order to make it appear like a 0.5
 opacity overlay of Roadmap, I get this:

 http://dl.dropbox.com/u/48944369/moon.html

 Clicking Map/Moon seems to sort of do what I expect, (i.e. moon tiles
 overlaid on Google's render of the earth) but this appears to be due
 to a bug, not a feature.

 Thank you

 On Nov 9, 6:54 pm, Martin™ warwo...@gmail.com wrote:







  Hi again.

  Look at the documentation for ImageMapType:

 http://code.google.com/apis/maps/documentation/javascript/maptypes.ht...

  See that you create your ImageMapType and then insert it into the
  Map's overlayMapTypes array.

  That's different to creating a StyledMapType.

  If you want an ImageMapType then why not just start with the demo code
  i linked to above?

  Note that if you click the View example link for that demo code it
  redirects to:

 http://code.google.com/apis/maps/documentation/javascript/examples/ma...

  That's not the demo page code!

  The link you posted has an error too.
  It's encoding is UTF-16LE and i think has been saved with a Unicode
  signature (BOM) which seems to prevent the API from loading.
  Might just be a problem with dropbox and not a problem with your
  original code.

  Martin.

  On Nov 10, 2:19 am, Map Guy rclair...@gmail.com wrote:

   Apologies, I thought it would be easier to make changes if I supplied the
   file in email.

   Here it is online:

  http://dl.dropbox.com/u/48944369/goog.html

   If there is a beer fund, I'll happily contribute :)- 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: ImageMapType issue?

2011-11-08 Thread Martin
Hi.

http://code.google.com/apis/maps/documentation/javascript/maptypes.html#ImageMapTypes

Looks like you've not defined a (required) 'tileSize' property in your
options.

Martin.


On Nov 9, 6:20 am, Map Guy rclair...@gmail.com wrote:
 Starting with this example:

 http://code.google.com/apis/maps/documentation/javascript/examples/ma...

 Changing:

 var jayzMapType = new google.maps.StyledMapType(stylez, styledMapOptions);

 To

 var jayzMapType = new google.maps.ImageMapType(styledMapOptions);

 Where: (getTileUrl is the addition)

   var styledMapOptions = {
  getTileUrl: function(coord, zoom)
    {
       return http://foo.com/foo.png;;
    },
     name: Hip-Hop
   };

 Results in (IE):

 Message: Expected value implementing google.maps.MapType
 Line: 1
 Char: 28
 Code: 0
 URI:http://maps.gstatic.com/intl/en_us/mapfiles/api-3/7/0/main.js
 Is there something basic I'm missing here or is this a bug?

 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: Aligning a google map canvas

2011-11-08 Thread Martin
Is this an API or a CSS question?

Sounds like you want to brush up on your CSS to me, here's a useful
link:

http://www.barelyfitz.com/screencast/html-training/css/positioning/

Martin.


On Nov 8, 4:26 pm, munji munjing...@gmail.com wrote:
 By default every time i load my map, it always aligns itself to the
 left no matter how small the map is
 How can center the map so that it appears in the middle of the browser
 or even have fun with the canvas such that it appears to the left

-- 
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: mouse scroll is zooming in and scrolling down page

2011-11-07 Thread Martin
I see the same behaviour with the latest Firefox on Window 7 64 bit.

There's an old issue here:

http://code.google.com/p/gmaps-api-issues/issues/detail?id=1605can=1q=apitype%3AJavascript3%20firefox%20scrollcolspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Internal%20Stars

That's marked as fixed and someone has since added a comment #5 that
the bug has returned but it doesn't look like Google have responded.

Martin.


On Nov 7, 10:08 pm, civilsurfer shadke...@gmail.com wrote:
 http://www.greenandtheblue.com/weather/allsites.html

 On Firefox, the map zooms in and scrolls down the page when hovering
 over the map and using the scroll wheel.  In IE, it only zooms in.  I
 want the map to only zoom, not scroll down the page too.  Are there
 any fixes for this?

 Thanks,
 S

-- 
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: Creating new divs on the map

2011-11-04 Thread Martin
Or is a CustomControl what is required?

http://code.google.com/apis/maps/documentation/javascript/controls.html#CustomControls

Martin.


On Nov 4, 1:34 pm, JD Gauchat macr...@yahoo.com.ar wrote:
 If what you want is to put the map inside a div and then have other divs
 shown over it you have to use these CSS properties:

 position: relative;
 position: absolute;

 and place the div that's going over, inside the first one. For example, I
 use a construction like this:

 div style=position: relative;
   div style=position: absolutehere goes the map/div
   div style=position: absolute; z-index: 10
       here goes the error message that's going to show up over the map
   /div
 /div

-- 
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.



Re: [Google Maps API v3] Re: Marker Mouseover

2011-11-02 Thread Martin Möbius
thanks that works!

Martin

2011/11/1 Rossko ros...@culzean.clara.co.uk

  How I can solve that Markers are not activate his event if there below
  an visible Infowindow.

 Try with marker option optimized set to false

 --
 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.



-- 
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] Marker Mouseover

2011-11-01 Thread Martin Möbius
Hello Community,

I have a Problem with Maps with integrated Markers and connected
Infowindows.
Each Marker connect with an Mouseoverevent that open a Infowindow but
that Events are activated if Markers are below that Infowindow.

How I can solve that Markers are not activate his event if there below
an visible Infowindow. A high value for zIndex attribute don't work
here !

Thanks for advice,

Martin

 German:

Hallo Community,

ich habe ein Problem in einer Map mit integrierten Markern die über
ein Mouseover-Event eine separate Infowindow öffnen.
Das Problem ist das die Marker-Events unterhalb der gezeigten
Infowindow immer noch ausgelöst werden.
Wie kann ich das verhindern? Über das zIndex Attribut der Infowindow
komme ich leider zu keiner Lösung!

Vielen Dank,

Martin

-- 
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: Listing zoom

2011-10-31 Thread Martin
Hi.

Try updating your code so it knows how many markers have been created
and sets the map bounds based on that:

[code]
var visibleMarkersCount=0;
for (var i = 0; i  markerNodes.length; i++) {
var id = markerNodes[i].getAttribute(property_id);
var city_id = markerNodes[i].getAttribute(city);
var state_id = markerNodes[i].getAttribute(state);
var country_id = markerNodes[i].getAttribute(country);
var postal_code = markerNodes[i].getAttribute(postal_code);
var address = markerNodes[i].getAttribute(street);
var price = markerNodes[i].getAttribute(price);
var bedrooms = markerNodes[i].getAttribute(bedrooms);
var bathrooms = markerNodes[i].getAttribute(bathrooms);
var category_id = markerNodes[i].getAttribute(type);
var living_area = markerNodes[i].getAttribute(sqft);
var lot_area = markerNodes[i].getAttribute(lotsqft);
var listing_type_id = markerNodes[i].getAttribute(listing);
var building_name = markerNodes[i].getAttribute(building_name);
var distance = parseFloat(markerNodes[i].getAttribute(distance));
var googlemap_ltgooglemap_ln = new google.maps.LatLng(
parseFloat(markerNodes[i].getAttribute(googlemap_lt)),
parseFloat(markerNodes[i].getAttribute(googlemap_ln)));
createOption(address, distance, i+1);
createMarker(googlemap_ltgooglemap_ln, address, city_id, state_id,
country_id, postal_code, price, bedrooms, bathrooms, category_id,
living_area, lot_area, building_name, listing_type_id, id);
bounds.extend(googlemap_ltgooglemap_ln);
visibleMarkersCount++;
}

switch(visibleMarkersCount){
case 0:
//  no markers have been created
//  set map zoom and center accordingly - or just it leave 
it as it
is
break;
case 1:
//  a single marker has been created
//  center on the marker but set a zoom level that's not 
fully zoomed
in
break;
default:
//  two or more markers have been created
//  fit the map to the markers
map.fitBounds(bounds);
}
[/code]

http://www.w3schools.com/js/js_switch.asp

Martin.


On Oct 31, 2:40 pm, Am am2...@gmail.com wrote:
 I wasn't able to find another post similar to my question, but I'm hoping
 someone can help walk me through this.

 How do I set the zoom level of the map when I search for properties? I
 don't have a url, so I'm not sure how to set the zoom. For example: When I
 search for an address that does not have a property in the search radius,
 my map zooms in 100% to the address. It does the same if there is only 1
 property in the search radius. How do I change it so it only zooms in part
 way, like 50% (or zoom=7)? I don't have a url anywhere in my code; it's all
 php and javascript.

 http://www.rentalmatch101.com.php5-20.dfw1-1.websitetestlink.com/goog...

 Thank you for your help.

-- 
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: google maps v3 icons list

2011-10-28 Thread Martin
And some more listed here:

http://www.visual-case.it/cgi-bin/vc/GMapsIcons.pl

Martin.


On Oct 28, 7:01 am, jufemaiz euphem...@gmail.com wrote:
 Not sure about the official maps (unofficial listing 
 athttp://mapki.com/wiki/Available_Images) , but there *is* 
 alsohttp://mapicons.nicolasmollet.com/

-- 
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: How to maintain map center LatLng while window resizing?

2011-10-27 Thread Martin
Hi.

Try something like this...

Create a global variable:

var lastMapCenter;


Add an event listener to your map, listen for the 'center_changed'
event:

google.maps.event.addListener(g_map, 'center_changed', function(){
 // save the map center
 lastMapCenter=g_map.getCenter();
});

Now listen for the map 'resize' event:

google.maps.event.addListener(g_map, 'resize', function(){
 // restore the last saved map center
 g_map.setCenter(lastMapCenter);
});

Martin.


On Oct 28, 1:18 am, sam sanja...@gmail.com wrote:
 FWIW, for now I'm just going to go with this:

 function resize() {
     if (g_map) {
         var center = g_map.getCenter();
         google.maps.event.trigger(g_map, 'resize');
         g_map.setCenter(center);
     }

 }

 On Oct 27, 4:55 pm, sam sanja...@gmail.com wrote:







  How do I maintain the map's center position (lat/lng) when the user
  resizes their browser window?

  Here's what I have, but I'm not thrilled with it. This function is
  bound to the window's resize event. It resets the center every 10
  milliseconds during the resizing. I got the idea from StackOverflow
  (http://stackoverflow.com/questions/563/center-on-resize-too).

  pre
      function resize() {
          if (g_map) {
              var c = g_map.getCenter();
              var that = this;
              if(!('balancer' in that) ) {
                  that.balancer = setTimeout(function() {
                      g_map.setCenter(c);
                      delete that.balancer;
                  }, 10);
              }
          }
      }
  /pre

  I'm hoping there is a smoother, more accurate solution.

-- 
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: Optimised Markers consume the Map mousemove event

2011-10-26 Thread Martin
Hi Chris.

Is there any news on this issue yet?

Thanks.

Martin.


On Oct 17, 4:25 pm, Chris Broadfoot c...@google.com wrote:
 Hi Martin,

 This does indeed look like a bug. The only point of contention is whether
 the bug lies with optimized markers, or unoptimized markers. In reality,
 clickable (default true) means that the overlay (marker, polygon,
 polyline) captures all mouse events.

 I'll raise this issue with the team.

 Thanks,
 Chris

 --http://twitter.com/broady







 On Sun, Oct 16, 2011 at 5:25 PM, Martin™ warwo...@gmail.com wrote:
  Hi All.

  I've started a new thread for this subject - it follows on from this
  recent thread about MarkerImage and optimised Markers:

 https://groups.google.com/group/google-maps-js-api-v3/browse_frm/thre...

  I've run into a problem with optimised Markers and the Map mousemove
  event...

  Here's a project i've been working on:

 http://developer.martinpearman.co.uk/markers_event_layer/demo/index.htm

  and

 http://developer.martinpearman.co.uk/markers_event_layer/demo/index.h...

  I'm detecting click OR mouseover and mouseout events on all markers
  under the mouse - not just the top most marker.
  My first link is the mouseover and mouseout version, my second link
  the click version.

  Markers consume the Map click event so my single Map click event
  listener detects no Marker clicks unless you set the MarkerOption
  clickable to false.
  My code does this and it works as desired except i'd like the cursor
  to change when over a Marker - that doesn't happen when the
  MarkerOption clickable is false.

 http://code.google.com/apis/maps/documentation/javascript/reference.h...

  Anyway that demo defines a MarkerImage with a scaledSize set to the
  same size as the MarkerImage's size.
  If you read the thread i linked to you'll find that setting a
  MarkerImage scaledSize forces non-optimised Markers.
  So i changed my demo to pass null as scaledSize in the MarkerImage
  connstructor and thought that would give me optimised Markers and my
  existing code would still work but it doesn't.

  Optimised Markers by default consume the Map mousemove event so my
  demo's mousemove event listener never executes.
  Much like the demo's click event listener never executes unless the
  MarkerOption clickable is set to false.
  (Non-optimised Markers with MarkerOption clickable set to true
  (default) do NOT consume the Map mousemove event).

  Setting an optimised Marker's MarkerOption clickable to false stops
  the Marker from consuming the Map mousemove event and my code again
  works as desired - albeit with no change of cursor when over a Marker.

  Here's a simple map that demonstrates this behavior:

 http://developer.martinpearman.co.uk/markers_event_layer/mousemove_ev...

  On that map, Markers are optimised and clickable - both these options
  are the defaults.
  Move the mouse over a group of Markers and you'll see the Map
  mousemove event listener stops updating the mouse position top center
  of map.

 http://developer.martinpearman.co.uk/markers_event_layer/mousemove_ev...

  That map uses non-optimised Markers that are clickable by default and
  the Map mousemove event listeners executes even when the mouse is over
  one or more Markers.

 http://developer.martinpearman.co.uk/markers_event_layer/mousemove_ev...

  Markers on this map are optimised but NOT clickable and the Map
  mousemove event listener executes as desired.

  The documentation for Map events points out that the Map click event
  does NOT fire when a Marker is clicked on (it doesn't mention
  MarkerOption clickable), but doesn't mention that the Map mousemove
  event does not fire when the mouse is over an optimised Marker.

  So my question - is this a bug or the intended behavior?

  For my project i can set the MarkerOption clickable to false so BOTH
  my Map click and Map mousemove event listeners execute as desired and
  it will work.
  But i'd rather that at least with the Map mousemove event i can leave
  clickable set to true so that the mouse icon changes to a pointer when
  over a Marker.

  Thanks for reading my long(ish) post!

  Martin.

  --
  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.

-- 
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: LatLngBounds returns undefined value

2011-10-23 Thread Martin
Firebug finds the error straight away!

mymap.map is undefined
https://gusev.pro/test.html
Line 66

I guess you want:

mymap.fitBounds( bounds );

Martin.


On Oct 21, 9:21 pm, Vladimir veg...@gmail.com wrote:
 Hello,

 i'm using v3, loading it async, creating the map object, then markers
 and paths work ok, but when i try to set map bounds as

     // mymap, northeast , southwest are checked and look ok
     google.maps.event.addListener ( mymap , 'idle' , function ( ) {
         // fit map boundaries
         var bounds      = new google.maps.LatLngBounds ( northeast ,
 southwest ) ;
         mymap.map.fitBounds ( bounds ) ;
     } ) ;

 LatLngBounds() still returns undef even as an event listener.

 The full story is here:https://gusev.pro/test.html

 Could you please advice how to get it worked?

 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: How to trigger a Tile Server to dynamically update tiles

2011-10-21 Thread Martin
Hi Kesuke.

Take a look at this:

http://code.martinpearman.co.uk/deleteme/my_overlay_map/index.html

That's a working example that updates every 10 seconds.

The get_tile.php script simply creates a blank PNG tile and draws the
timestamp from the tile request onto the tile:

?php
header('Content-type: image/png');
header('Cache-Control: no-cache, must-revalidate');

$tile=imagecreatefromstring(base64_decode('iVBORw0KGgoNSUhEUgAAAQEACAYAAABccqhmB3RJTUUH2gceBB0d5vTBTAlwSFlzAAALEgAACxIB0t1+/
ARnQU1BAACxjwv8YQUAAAEVSURBVHja7cExAQAAAMKg9U/
tawigAAB4AwE8AAHYKUMEAElFTkSuQmCC'));
imagesavealpha($tile, true);
$textcolor = imagecolorallocate($tile, 0, 0, 255);
imagestring($tile, 4, 10, 10, $_GET['timestamp'], $textcolor);

imagepng($tile);
?

Martin.


On Oct 21, 12:46 am, Kesuke nick_dai...@hotmail.com wrote:
 How does it perform in the end? I'd love to see a link as am thinking
 of implementing something similar to smooth out transitions in my
 custom overlays.

 I was wondering whether the need for 5 second updates couldn't be
 changed to perhaps 10 or even 15+? At 5 seconds isn't there a danger
 than tile refreshes will clip on each other if there is a lag spike or
 the internet connection is generally slow? I guess you could always
 include a toggle somewhere to disable live updates if necessasry.

 Also, have you specified a no-cache or no-store HTTP header in your
 tileserver.php?

 On Oct 20, 8:02 pm, Martin™ warwo...@gmail.com wrote:







  Just to keep this thread updated we have got my code working.

  The MyOverlayMap code i posted before this thread did not properly
  refresh the tile layer.
  It didn't get closure on the image onload event listener in the
  tileRefresh() method.

  Here's the working code:

  [code]
  function MyOverlayMap(tileSize) {
          this.loadedTiles = {};
          this.tileSize = tileSize;}

  MyOverlayMap.prototype.getTile = function (coord, zoom, ownerDocument)
  {
          function getURI(coord, zoom) {
                  return 'tile.php?x=' + coord.x + 'y=' + coord.y + 'z=' + 
  zoom;
          }
          var tileUrl = getURI(coord, zoom);
          var tileId = 'x_' + coord.x + '_y_' + coord.y + '_zoom_' + zoom;
          var tile = ownerDocument.createElement('div');
          tile.style.backgroundPosition = 'center center';
          tile.style.backgroundRepeat = 'no-repeat';
          tile.style.height = this.tileSize.height + 'px';
          tile.style.width = this.tileSize.width + 'px';
          tile.tileId = tileId; //        do not use 'id' as new custom 
  property as
  it's a native property of all HTML elements
          tile.tileURL = tileUrl;
          this.loadedTiles[tileId] = tile;
          tileUrl += 'timestamp=' + new Date().getTime();
          var img = new Image();
          img.onload = function () {
                  tile.style.backgroundImage = 'url(' + tileUrl + ')';
                  img.onload = null;
                  img = null;
          };
          img.src = tileUrl;
          return tile;};

  MyOverlayMap.prototype.refreshTiles = function () {
          function onloadCallback(tile2, tileUrl2){
                  return function(){
                          tile2.style.backgroundImage = 'url(' + tileUrl2 + 
  ')';
                  };
          }
          for (var tileId in this.loadedTiles) {
                  var tile = this.loadedTiles[tileId];
                  var tileUrl = tile.tileUrl + 'timestamp=' + new 
  Date().getTime();
                  var img = new Image();
                  img.onload = onloadCallback(tile, tileUrl);
                  img.src = tileUrl;
          }};

  MyOverlayMap.prototype.releaseTile = function (tile) {
          delete this.loadedTiles[tile.tileId];
          tile = null;};

  [/code]

  Now a call to refreshTiles() successfully and SMOOTHLY updates the
  tiles.

  Martin.

  On Oct 20, 5:52 pm, Michael Geary m...@mg.to wrote:

   That's right. I'm afraid I didn't make my original suggestion clear 
   enough:
   the code I linked to wasn't a way to make the remove-add sequence work
   better, it was pointing to a way to avoid the remove and add entirely, by
   adding a refresh method as you've done in your code here.

   Also, David, I noticed one unrelated problem in the most recent code you
   posted. It looked like you took my code and converted it to define its
   methods using the constructor prototype instead of nesting the methods
   inside the constructor. That's fine - both approaches are reasonable. But
   when you converted the code to use the prototype, you made the 'tiles'
   variable a global. Not good - if you ever had

[Google Maps API v3] Re: Maps in Android with HTML5

2011-10-20 Thread Martin
Hi.

Try loading the Google API script before your map.js script:

head
meta name=viewport content=initial-scale=1.0, user-scalable=no /

script type=text/javascript src=jquery-1.5.min.js /script
script type=text/javascript src=http://maps.google.com/maps/api/
js?sensor=true/script
script type=text/javascript src=map.js /script
/head

If map.js executes before the Google API is loaded then all the API
methods will be undefined.

Martin.


On Oct 20, 8:14 am, kennyhp danicord...@gmail.com wrote:
 I'm trying to make an application using google maps with HTML5. The
 idea is then to be a native application for Android (later of iPhone),
 encapsulated in a WebView. The problem I have is I do not read maps
 API from Android device. If I test the page from Firefox works fine,
 but to which I put into the Android is no way that it works. After
 many trials I have something like this:

 Activity code:
 package com.sts;

 import android.app.Activity;
 import android.os.Bundle;
 import android.webkit.WebChromeClient;
 import android.webkit.WebView;

 public class PruebaActivity extends Activity {
     /** Called when the activity is first created. */
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main);

         WebView webView = (WebView)findViewById(R.id.webView);
         webView.getSettings().setJavaScriptEnabled(true);
         //webView.getSettings().setGeolocationEnabled(true);
         webView.setWebChromeClient(new WebChromeClient());
         webView.loadUrl(file:///android_asset/www/index.html);

     }

 }

  index.html (In the code hit the API call is commented that the
 asynchronous call, but I've tried to call uncommented.)
 html
 head
     meta name=viewport content=initial-scale=1.0, user-
 scalable=no /
     script type=text/javascript src=jquery-1.5.min.js /script
     script type=text/javascript src=map.js /script
    !--script type=text/javascript src=http://maps.google.com/maps/
 api/js?sensor=true/script--

 /head
 body
     div id=map_canvas style=width: 100%; height: 100%

     /div
     button onclick=LoadMap()Hola/button
 /body
 /html

  And map.js:
 var map = null;
 function LoadMap() {

     alert(Entra);
     var mapLayout = document.getElementById(map_canvas);

     map = new google.maps.Map(mapLayout, { mapTypeId:
 google.maps.MapTypeId.ROADMAP, zoom: 18 });

     if (navigator.geolocation) {
         alert(Si);
         navigator.geolocation.getCurrentPosition(function(position) {
             map.setCenter(new
 google.maps.LatLng(position.coords.latitude,
 position.coords.longitude));
         });
     }
     else {
     alert(No);
         map.setCenter(new google.maps.LatLng(37.4419, -122.1419));
     }

 }

 $(document).ready(function(e) {

         var script = document.createElement(script);
         script.type = text/javascript;
         script.src = http://maps.google.com/maps/api/js?
 sensor=truecallback=LoadMap;
         document.body.appendChild(script);

 });

  This works in Firefox, but since Android never gets to call LoadMap
 ()

 If you reference the API from the HTML and the document.ready LoadMap
 call (), tells me: ReferenceError: Can not find variable: google at
 file: / / / android_asset / www / map.js: 8

 Any idea? Thank's.

-- 
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: How to trigger a Tile Server to dynamically update tiles

2011-10-20 Thread Martin
Just to keep this thread updated we have got my code working.

The MyOverlayMap code i posted before this thread did not properly
refresh the tile layer.
It didn't get closure on the image onload event listener in the
tileRefresh() method.

Here's the working code:

[code]
function MyOverlayMap(tileSize) {
this.loadedTiles = {};
this.tileSize = tileSize;
}
MyOverlayMap.prototype.getTile = function (coord, zoom, ownerDocument)
{
function getURI(coord, zoom) {
return 'tile.php?x=' + coord.x + 'y=' + coord.y + 'z=' + zoom;
}
var tileUrl = getURI(coord, zoom);
var tileId = 'x_' + coord.x + '_y_' + coord.y + '_zoom_' + zoom;
var tile = ownerDocument.createElement('div');
tile.style.backgroundPosition = 'center center';
tile.style.backgroundRepeat = 'no-repeat';
tile.style.height = this.tileSize.height + 'px';
tile.style.width = this.tileSize.width + 'px';
tile.tileId = tileId; //do not use 'id' as new custom property 
as
it's a native property of all HTML elements
tile.tileURL = tileUrl;
this.loadedTiles[tileId] = tile;
tileUrl += 'timestamp=' + new Date().getTime();
var img = new Image();
img.onload = function () {
tile.style.backgroundImage = 'url(' + tileUrl + ')';
img.onload = null;
img = null;
};
img.src = tileUrl;
return tile;
};
MyOverlayMap.prototype.refreshTiles = function () {
function onloadCallback(tile2, tileUrl2){
return function(){
tile2.style.backgroundImage = 'url(' + tileUrl2 + ')';
};
}
for (var tileId in this.loadedTiles) {
var tile = this.loadedTiles[tileId];
var tileUrl = tile.tileUrl + 'timestamp=' + new 
Date().getTime();
var img = new Image();
img.onload = onloadCallback(tile, tileUrl);
img.src = tileUrl;
}
};
MyOverlayMap.prototype.releaseTile = function (tile) {
delete this.loadedTiles[tile.tileId];
tile = null;
};
[/code]

Now a call to refreshTiles() successfully and SMOOTHLY updates the
tiles.

Martin.


On Oct 20, 5:52 pm, Michael Geary m...@mg.to wrote:
 That's right. I'm afraid I didn't make my original suggestion clear enough:
 the code I linked to wasn't a way to make the remove-add sequence work
 better, it was pointing to a way to avoid the remove and add entirely, by
 adding a refresh method as you've done in your code here.

 Also, David, I noticed one unrelated problem in the most recent code you
 posted. It looked like you took my code and converted it to define its
 methods using the constructor prototype instead of nesting the methods
 inside the constructor. That's fine - both approaches are reasonable. But
 when you converted the code to use the prototype, you made the 'tiles'
 variable a global. Not good - if you ever had more than one instance of this
 object it would break. Instead, if you prefer the prototype approach, the
 tiles variable should be something like 'this.tiles', as shown in Martin's
 version.

 -Mike







 On Wed, Oct 19, 2011 at 9:45 PM, Martin™ warwo...@gmail.com wrote:
  Hi again.

  I think you need to abandon the old method - removing the overlay map
  type and re-adding it to the map.
  You will always get a flicker with that method i believe.

  Try this for a basic overlay map:

  [code]
  function MyOverlayMap(tileSize) {
         this.loadedTiles = {};
         this.tileSize = tileSize;
  }
  MyOverlayMap.prototype.getTile = function (coord, zoom, ownerDocument)
  {
         function getURI(coord, zoom) {
                 return 'tile.php?x=' + coord.x + 'y=' + coord.y + 'z=' +
  zoom;
         }
         var tileUrl = getURI(coord, zoom);
         var tileId = 'x_' + coord.x + '_y_' + coord.y + '_zoom_' + zoom;
          var tile = ownerDocument.createElement('div');
          tile.style.backgroundPosition = 'center center';
         tile.style.backgroundRepeat = 'no-repeat';
          tile.style.height = this.tileSize.height + 'px';
         tile.style.width = this.tileSize.width + 'px';
          tile.tileId = tileId; //        do not use 'id' as new custom
  property as
  it's a native property of all HTML elements
         tile.tileURL = tileUrl;
         this.tiles[tileId] = tile;
         tileUrl += 'timestamp=' + new Date().getTime();
         var img = new Image();
         img.onload = function () {
                 tile.style.backgroundImage = 'url(' + tileUrl + ')';
                  img.onload = null;
                 img = null;
         };
          img.src = tileUrl;
         return tile;
  };
  MyOverlayMap.prototype.refreshTiles = function () {
         for (var tile in this.tiles) {
                 var tileUrl = tile.tileUrl + 'timestamp=' + new
  Date().getTime();
                 var img = new Image

[Google Maps API v3] Re: Resize MVC Radius

2011-10-18 Thread Martin
Hi.

Try:

myRadiusWidget.set('distance', the_input_value)

Where myRadiusWidget is the instance of RadiusWidget that you have
created - and kept a reference to.

Martin.


On Oct 18, 4:41 am, finco mbeck...@gmail.com wrote:
 I've built a map where a circle can be resized by dragging the edge.  It is
 based on Luke Mahe's example 
 athttp://code.google.com/apis/maps/articles/mvcfun.html.  I'd like to add an
 input field which will resize the circle based on the value of the input.  I
 can do this by calling the init() function again but there must be a way to
 just resize the circle without reloading the map.  I thought it was going to
 be RadiusWidget.prototype.set('distance',the_input_value) but no success
 with that.

 Can someone please point me in the right direction?  Thanks in advance for
 your help.

-- 
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: How to trigger a Tile Server to dynamically update tiles

2011-10-18 Thread Martin
Hi.

Have you tried simply removing your overlay map and then re-adding it?

map.overlayMapTypes.removeAt(0);
map.overlayMapTypes.setAt(0,overlayMap);

You'll still have to watch for problems with the browser caching
tiles, but if you add a bogus parameter to each tile URL then it
should force a reload of all visible tiles.

A bogus parameter based on the current time is a good idea:

var overlayMaps = [{
  getTileUrl: function(coord, zoom) {
return tileserver.php?x=+coord.x+y=+coord.y+z=+zoom
+g=1bogus=+new Date().getTime();
  },

  tileSize: new google.maps.Size(256, 256),
  isPng: true,
  opacity: 1.0

}];


Martin.

On Oct 18, 4:18 am, David david.gonzalez.gutier...@gmail.com wrote:
 Rossko, thank you very much for your reply.

 Yes, I am actually getting my tiles updated by the tile server every
 5s,
 but as you said the problem is re-fetching map tiles that have already
 been fetched.

 I have no idea on how to make a custom tile management in JavaScript,
 could you please show me any reference / sample that I could use a
 starting point?

 Thanks...

 On 10月18日, 午前9:49, Rossko ros...@culzean.clara.co.uk wrote:







   How could I trigger my tile server to re-compute all tiles (or at
   least the ones in the viewport) every 5 seconds ?

  That doesn't seem to be a question about the maps API, but about
  whatever you are using for a tile server.  One approach might be just
  to have it calculate new tiles for every request it gets.  That could
  be streamlined a bit by only creating anew if the cached version is
  more than 5 seconds old.

  Your real problem is that the API won't re-fetch custom map tiles
  every five seconds, I think you will need to code your own tile
  management for that.  Take steps to circumvent browser caching.

-- 
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: How to trigger a Tile Server to dynamically update tiles

2011-10-18 Thread Martin
Hi.

I nearly mentioned in my previous post that you might get a flicker as
you remove and re-add the tiles.
That's unavoidable with the code i posted i'm pretty sure of that.

To get the tiles to refresh without that flicker would require a
different approach - nowhere near as straightforward as the code i
posted.

I think you'd have to save a reference to each requested tile in your
getTile() method.
Save a reference so that you can change each tile image source at any
time.

Now to refresh your tile layer you'd iterate through all the tile
references and change the image source - with a bogus parameter this
would work.
The only problem would be knowing which tiles are still being
displayed by the map so that you don't refresh each and every tile
that has been created since the tiles were last refreshed.

Maybe you can implement a releaseTile() method in your overlay map?

http://code.google.com/apis/maps/documentation/javascript/reference.html#MapType

So getTile() would function as it does now - it would also save a
reference to each tile requested.

Your new releaseTile() method would remove references to tiles that
are no longer loaded/visible.

And every time you want to refresh the tiles, you'd get the references
to loaded/visible tiles and update each one's image source.

Martin.


On Oct 18, 8:56 am, David david.gonzalez.gutier...@gmail.com wrote:
 Martin, thanks for your reply!

 I see, using the date as a bogus parameter works very well !
 However, the problem is that there is a bit of flashing when removing
 and adding the tiles. I guess it is not possible to completely avoid
 that, right ?

 On Oct 18, 3:49 pm, Martin™ warwo...@gmail.com wrote:







  Hi.

  Have you tried simply removing your overlay map and then re-adding it?

  map.overlayMapTypes.removeAt(0);
  map.overlayMapTypes.setAt(0,overlayMap);

  You'll still have to watch for problems with the browser caching
  tiles, but if you add a bogus parameter to each tile URL then it
  should force a reload of all visible tiles.

  A bogus parameter based on the current time is a good idea:

  var overlayMaps = [{
    getTileUrl: function(coord, zoom) {
      return tileserver.php?x=+coord.x+y=+coord.y+z=+zoom
  +g=1bogus=+new Date().getTime();
    },

    tileSize: new google.maps.Size(256, 256),
    isPng: true,
    opacity: 1.0

  }];

  Martin.

  On Oct 18, 4:18 am, David david.gonzalez.gutier...@gmail.com wrote:

   Rossko, thank you very much for your reply.

   Yes, I am actually getting my tiles updated by the tile server every
   5s,
   but as you said the problem is re-fetching map tiles that have already
   been fetched.

   I have no idea on how to make a custom tile management in JavaScript,
   could you please show me any reference / sample that I could use a
   starting point?

   Thanks...

   On 10月18日, 午前9:49, Rossko ros...@culzean.clara.co.uk wrote:

 How could I trigger my tile server to re-compute all tiles (or at
 least the ones in the viewport) every 5 seconds ?

That doesn't seem to be a question about the maps API, but about
whatever you are using for a tile server.  One approach might be just
to have it calculate new tiles for every request it gets.  That could
be streamlined a bit by only creating anew if the cached version is
more than 5 seconds old.

Your real problem is that the API won't re-fetch custom map tiles
every five seconds, I think you will need to code your own tile
management for that.  Take steps to circumvent browser caching.

-- 
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: how to pass data to a marker click function

2011-10-17 Thread Martin
Hi uno.

Version 3 of the API has made marker click event delegation somewhat
impossible (or tricky).

The Map click event doesn't fire when the user clicks on the Map while
(also) clicking on a Marker.

So, tradionally you cannot assign a single event listener to the Map
to handle ALL Marker clicks.

I've been working on an alternative approach.
The code is not ready for public consumption yet but you can take a
look:

http://developer.martinpearman.co.uk/markers_event_layer/demo/index.htm?eventtype=click

Here a single Map click event listener detects ALL Markers that have
been clicked on.
Not just whatever Marker happens to be upper most visually (think z-
index).

There are some problems with optimised Markers, see here for details:

https://groups.google.com/group/google-maps-js-api-v3/browse_frm/thread/98cd2607d15cc805/3f6725964190a6a0?hl=en#3f6725964190a6a0

My code also works well with mouse events:

http://developer.martinpearman.co.uk/markers_event_layer/demo/index.htm

With that option a single Map mousemove event listener performs much
the same as the Map click listener.

Once Chris and the Google team decide how a Map mousemove event should
behave as regards propogation i'll work more on my code to create a
(hopefully useful) library.

Martin.


On Oct 16, 1:27 pm, uno radio.apo...@googlemail.com wrote:
 hello, probably only half a maps question, but if someone could
 enlighten me...
 what i do is:

 google.maps.event.addListener(Marker, 'click', function() {
   doSomethingWith(this);});

 function doSomethingWith(that) {...};

 works fine. but, i have 10k+ markers, and this way i create 10k+
 objects, right?
 what i'd like to do is:

 google.maps.event.addListener(Marker, 'click', doSomethingWith);
 function doSomethingWith(e) {...}

 where e should be the marker object, since i have to access some of
 its properties. but e is a LatLng object.
 so, how to get a reference to the marker itself?

 this:
   google.maps.event.addListener(Marker, 'click',
 doSomethingWith(Marker));
 obviously opens the gates of hell, when used in 10k+ loops... of
 course... ;)

 any idea anybody? it's not a problem anyway to use the anonymous
 function above, at least no browser i've tested with had performance
 problemes (markers are handled in markerClustererPlus). but i want to
 save something. is it worth the effort?
 thanks, uno

-- 
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: GMapsV3 - lots of MarkerImages slow down everything

2011-10-14 Thread Martin
I've replaced scaled size with null in my MarkerImage constructor and
am now seeing canvas elements (using Firebug) instead of img elements.

Marker click events all working fine too - touch wood.

The map definitely seems smoother to pan and zoom.

Martin.


On Oct 14, 3:02 pm, geocode...@gmail.com geocode...@gmail.com
wrote:
 On Oct 14, 1:12 am, Martin™ warwo...@gmail.com wrote:

  I agree.

  I tend to use the full MarkerImage constructor and have been
  specifying a scaled size equal to the original icon size.
  This means i've unknowingingly been disabling any canvas optimisations
  for my maps!

  Defintely worth a mention in the documentation i say.

  Can Ben confirm that passing null as the scaled size property won't
  cause un-optimalised markers?

 Beware of this 
 issue:http://groups.google.com/group/google-maps-js-api-v3/browse_frm/threa...

   -- Larry







  I have a marker manager script that needs to get each icon's size and
  anchor point so my code needs to icon size and anchor in the
  MarkerImage constructor.

  Passing null as scaled size but passing icon size and icon anchor
  point will give me canvas optimised markers will it?

  Thanks a lot.

  Martin.

  On Oct 14, 8:56 am, Kristóf Kótai kotai.kris...@gmail.com wrote:

   This is unbelievable...
   I removed the scaling (which doesn't even happen because the original
   size is the same as the new size):

  http://www.viewranger.com/kristof/p3.html

   And it is really fast...
   This should definitely be mentioned in the documentation! This would
   help many people a lot!

   Thanks, Kristof

   On Oct 14, 12:37 am, Ben Appleton apple...@google.com wrote:

Your code triggers the older DOM markers as it specifies a scale:
    icon: new google.maps.MarkerImage(
        
'http://viewranger.com/buddybeacon/v2/images/markers/marker_FF.png',
        new google.maps.Size(15,20), // original size
        new google.maps.Point(0,0), // origin
        new google.maps.Point(8,20), // anchor
        new google.maps.Size(15,20) // scaled size
    )
instead if you pass
    icon: 
'http://viewranger.com/buddybeacon/v2/images/markers/marker_FF.png'
you'll get the faster Canvas markers.

- Ben

On Thu, Oct 13, 2011 at 7:39 AM, Kristóf Kótai 
kotai.kris...@gmail.comwrote:

 Hi there,
 I know this issue has been posted probably a couple of times, and the
 answer was always that we should use the clustering lib to avoid 
 putting too
 many MarkerImages on the map.

 But my question is something else: If I put 400 Markers (using the 
 default,
 Google's marker image as an icon) then why is the map really fast? 
 And if I
 use a custom icon, no matter how detailed, if it's transparent or 
 not, it
 will be a 100 times slower.

http://www.viewranger.com/kristof/p1.html(Google'sicon)
http://www.viewranger.com/kristof/p2.html(Myicon)

 I tried to optimise the custom icon as best as I could, but when I 
 found
 out that even using a 5x5 pixel big icon (non-transparent, only 
 #ff
 colored pixels) and the map is still unbelievably slow, I started 
 windering
 what kind of magic icon does google use? Why can't I create such a 
 good,
 optimised icon?

 Is it even possible to create an optimised icon? Or is Google 
 cheating in
 someway?

 --
 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/-/9fmhHrHRU5UJ.
 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.

-- 
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: Date Query Slider to Filter Drop Pins

2011-10-13 Thread Martin
Have you seen Timemap?

http://code.google.com/p/timemap/

Martin.


On Oct 12, 3:47 pm, antony smith ant...@maxwelllucas.com wrote:
 Oh sages of the Maps API :) I'm hoping for a few pointers here please.

 I've implemented a map using a similar technique to what is shown in
 the tutorial below:

 http://code.google.com/apis/maps/articles/phpsqlajax.html

 Basically I've created an XML feed of blog posts out of a mySQL
 database which have a post date, title, lat, lng etc then overlay them
 as drop pins using the lat, lng on a map which all works nicely.

 Currently I filter the feed so it only returns posts in the last few
 days using the following query:

 $query = SELECT * FROM blog_post WHERE postDate =(CURDATE()-3);

 However I'm trying to enhance the functionality somewhat to allow the
 user to manipulate the date range of posts shown to achieve a similar
 effect to what is seen here except except showing pins and the
 variable will be the number of days.

 http://gmaps-samples-v3.googlecode.com/svn/trunk/fusiontables/cycletr...

 My thinking at the moment is to modify the SQL query to return a feed
 of updates in the last say 60 days then filter the result using
 JavaScript on the page, however I'm not sure how to do that!

 Any suggestions on the best way to achieve this or links to examples/
 tutorial would be much appreciated.

 Many 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: Prevent map panning when using google.maps.DirectionsService

2011-10-12 Thread Martin
Hi there.

http://code.google.com/apis/maps/documentation/javascript/reference.html#DirectionsRendererOptions

Look at the 'preserveViewport' option.

Martin.


On Oct 12, 6:49 am, Justin justin_ma...@dialog.com.au wrote:
 Hi,

 Im currently using the google.maps.DirectionsService and whenever I
 create a new route request, the map will pan to the location of the
 route. How do I prevent this from occuring?

 Regards

 Justin

-- 
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: Transaction limits and associated costs

2011-10-10 Thread Martin
To be honest most (all!) questions such as yours seem to go PARTLY or
WHOLLY unanswered not just in this group but also in the API 2 group
too.

I suspect that Google don't have a 'concrete' answer and are happy to
leave us all wondering what is what...

Martin.


On Oct 10, 2:42 pm, abanjo aba...@gmail.com wrote:
 Hi,in the last weeks, in the FAQ i found a new paragraph dedicated to the
 usage limits.Here a piece of it:*What transaction limits apply to the Maps
 API?*
 *There are currently no limits on the number of web based JavaScript or
 Flash maps a site can generate. However the Google Maps API Web Services and
 Google Static Maps API do have daily limits that are specified in their
 documentation.**From October 1st 2011 commercial web sites and applications
 using the Maps API may at no cost generate:**up to 2,500 map transactions
 per day that have been modified using the Styled Maps feature**up to 25,000
 map transactions per day in total*...and here the part relative to the
 costs:
 *What constitutes a 'map transaction' in the context of the transaction
 limits that apply to the Maps API?
 **A single map transaction occurs when:**the Maps JavaScript API (V2 or V3)
 is loaded by a web page or application;**a SWF that loads the Maps API for
 Flash is loaded by a web page or application; or**a single request is made
 for a map image from the Static Maps API.**a single request is made for a
 panorama image from the Street View Image API.*
 So if i correctly understand, if my site generate more than 25.000
 transactions  i must pay $4 for each slot of 1000 extra transactions.What is
 not clear to me is:- if i use the javascript V3 version, the 25.000 are
 calculated for the IP ( so the client ), the domain ( so the web site ) or
 what?- Well, the costs are for commercial web site... but what is considered
  commercial from Google? A page with banners (es Adsense ) is considered
 as commercial? - 4$ for 1000 transactions?? well if a transaction is
 generated for each maps load, this is quite near to pageviews. So, if i put
 an adsense banner MAYBE i can reach a 0,80$ RPM... so i pay 4 to gain less
 than 1? I think this a great problem for the major part of web sites.
 Maybe ( i hope ) i don't understand well what is written.Can anyone help me
 to clarify these doubts?ThanksDavide

-- 
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: Google Maps on android application

2011-10-05 Thread Martin
Hi.

You have two options to display a map in an Android app i think.

Create a browser based (javascript) map and use the Android WebView to
render that map or use the native Android (java) MapView.

A browser based map gives you access to all the current API services
and easy integration with the Google Places API.
You need skills in HTML5 technologies - javascript, css and html for
example.

A MapView requires a degree of skill in java.
You would need to write methods that get data from the Places API and
methods to render that data entirely in java.

A browser based map on Android devices older than v3 Honeycomb will
NOT support pinch to zoom and will probably take longer to load than a
MapView.

 A MapView is quick to load and natively supports pinch to zoom on all
multi-touch capable devices.

Each option has it's advanatges and disadvantages though - what is
your skill level?

Martin.



On Oct 5, 9:54 am, kintoki tengho...@gmail.com wrote:
 Hey guys I would like to know if I can use google maps to interact
 with an application that is build on android which is using Java? My
 program basically gives a set of questionaires and get a result and i
 want to use google places to get suggestions of shops with the result
 i get based on my questions? Is it possible?

-- 
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: Android and pinch-to-zoom

2011-09-30 Thread Martin
The native Android browser in versions prior to 3 simply does not
support multitouch events:

http://code.google.com/p/android/issues/detail?id=11909

Martin.


On Sep 30, 9:26 pm, JFrancis jfran...@mge.com wrote:
 So 3.0 is the lowest version Android which supports pinch-to-zoom? Why no
 versions prior to that?

 JF

-- 
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: generating a map between bounding pairs of lat and lon coordinates

2011-09-28 Thread Martin
Hi.

You can create a LatLngBounds object:

var myBounds=new google.maps.LatLngBounds();

http://code.google.com/apis/maps/documentation/javascript/reference.html#LatLngBounds

Extend it with all your points:

myBounds.extend(new google.maps.LatLng(20, -80));
myBounds.extend(new google.maps.LatLng(45, -110));

Now use the Map fitBounds() method to pan and zoom the map to contain
myBounds:

myMap.fitBounds(myBounds);

http://code.google.com/apis/maps/documentation/javascript/reference.html#Map

Martin.


On Sep 28, 7:59 pm, la evolvingt...@gmail.com wrote:
 I am new to Google Maps, so forgive me if this has already been
 discussed or if this question is a bit naiive.

 I am trying to generate a map that is positioned between two pairs of
 lat and lon coordinates. For example, between (20, -80) and (45, -110)
 in degrees. Is there a direct way to use the API to position the view
 displayed in the map to exactly match such a set of coordinates?

 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: Did you mean feature from maps.google.com

2011-09-18 Thread Martin
Have you seen the Places library?

http://code.google.com/apis/maps/documentation/javascript/places.html#places_autocomplete

Martin.


On Sep 18, 2:47 pm, Subodh Shah subodh9...@gmail.com wrote:
 Hi,

 I am wondering if its possible to implement the *Did you mean* feature which
 is available athttp://maps.google.com?In other words, here is what I am
 trying to do.

 If the user inputs A as a location and if there is more that 1 place with
 the same name, I want to show a list of all the possible places/ address;
 allowing user to select the place as per his interest from the various
 options.

 Is it possible using the API, especially the DirectionService API? Or is
 there any other API which I can make use of?

 Any pointers are most appreciated.

 Thanks,
 Subodh

-- 
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: Is it possible to add the location name before the address of each waypoint on DirectionsRenderer?

2011-09-14 Thread Martin
Hi.

Not with V3 of the API:

http://code.google.com/p/gmaps-api-issues/issues/detail?id=2775

Martin.


On Sep 15, 12:48 am, Dan d.chen0...@gmail.com wrote:
 By applying the concept of this 
 example:http://code.google.com/apis/maps/documentation/javascript/examples/di...

 Is it possible to add the location name before the address of each waypoint
 on DirectionsRenderer?
 e.g.

 https://lh3.googleusercontent.com/-DXUPQCgRLxI/TnE9Rq-TqvI/CI...

-- 
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: How to cache server side geocodes

2011-09-14 Thread Martin
Hi.

How about first creating a MySQL table with columns 'md5', 'lat' and
'lng'.
'md5' will be a text type, 'lat' and 'lng' double type.

Now create the query string that your server will send to Google,
presumably something like:

$geocode_query='http://maps.googleapis.com/maps/api/geocode/json?
sensor=falseaddress=the_address_to_geocode';

Now create an md5 checksum of that query string using PHP's md5()
function:

http://php.net/manual/en/function.md5.php

Next query the database for a row with that md5 value.

No row in the database means you query Google and if the geocode
request is successful insert the result into the database.
Otherwise you can use the cached geocode result from the database.

Martin.

On Sep 14, 3:41 pm, Mike henri.cammi...@gmail.com wrote:
 Hi,

 Thanks for the reply Barry but I couldn't find anything to help me cache the
 geocodes. The link also refers to gmaps v2, does that matter?

 I was looking for the correct way to store geocodes, look up new geocodes
 not in the cache and using the cache for map searching or looking up
 lat/longs

 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: How to tell when an ImageMapType overlay's tiles are finished loading?

2011-09-08 Thread Martin
Can you post the code which is your GetTileUrl() method?

Martin.

On Sep 8, 4:19 pm, millz d...@millz.com wrote:
 Thanks for the reply, Martin.

 That sure sounds like it would work, but how can I obtain a reference to the
 individual tile images such that I can listen for the onload event?

-- 
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: How to tell when an ImageMapType overlay's tiles are finished loading?

2011-09-07 Thread Martin
Hi.

You could keep an array of requested tiles - each time your
getTileUrl() method is called it add's a reference to the requested
tile to the array.

Then you can add an event listener to the tile image listening for the
'onload' event.
The event listener can remove the reference to the tile from the array
once it has loaded and if the array length is now zero then all
requested tiles have been loaded.

Martin.

On Sep 8, 2:27 am, millz d...@millz.com wrote:
 Hi,

 I'm working with the Google Maps v3 API, and I have a custom overlay layer
 based on the ImageMapType class. I would like to show a loading indicator of
 some sort while the overlay's tiles are loading, but I don't see any way to
 know when they are finished.

 The code to create the overlay looks similar to the following:

 var myOverlay = new google.maps.ImageMapType({
     getTileUrl: myGetTileUrl,
     tileSize: new google.maps.Size(256, 256),
     isPng: true});

 myMap.overlayMapTypes.push(myOverlay);

 The above works just fine, and the overlay successfully loads; it just seems
 that no events are emitted by the map to indicate anything about the
 ImageMapType overlay's status. I would expect the map to at least emit an
 idle event when the tiles are finished loading, but as far as I can tell
 it does not.

 How may I know when the ImageMapType overlay is finished loading?

 (I posted the same question on 
 SO:http://stackoverflow.com/questions/7341769/google-maps-v3-how-to-tell
 If I get an answer in one place I'll make sure to copy it to the other.)

 Thanks!

 Regards,
 Dave

-- 
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: Problem with marker becoming visible when mouse is hovered over it

2011-08-31 Thread Martin
Hi.

Look at the Polyline mouseover and mouseout events:

http://code.google.com/apis/maps/documentation/javascript/reference.html#Polyline

You can add an event listener for both events and each event listener
is passed a MouseEvent parameter:

http://code.google.com/apis/maps/documentation/javascript/reference.html#MouseEvent

So when a user hovers the mouse over any part of a Polyline your
mouseover event listener is passed a MouseEvent and that MouseEvent
contains the LatLng of the point on the Polyline that has been hovered
over.

You could add a Marker to the Map at that LatLng etc.

The mouseout event listener could remove that same Marker from the
Map.

Martin.


On Aug 31, 9:41 am, Rohit Bhat smashingro...@gmail.com wrote:
 My basic aim is to plot a route between two points and the starting and end
 marker would be shown. On the path, i want the other markers to become
 visible only when the mouse is hovered over a point in the route, otherwise
 it will become too cluttered. Could you please tell me how to do 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: Custom Controls flickering problem

2011-08-31 Thread Martin
Hi.

I think i'd look at adding a DOM event listener to the DOM element
that contains the map instead of using any API events.

The Map getDiv() method will give your code a reference to the DOM
element.

http://code.google.com/apis/maps/documentation/javascript/reference.html#Map

The DOM events 'onmouseover' and 'onmouseout' will tell you if the
mouse is within the map bounds or not.

Martin.


On Aug 31, 7:47 am, Shreerang Patwardhan
patwardhan.shreer...@gmail.com wrote:
 Hello Pil,

 I am the author of that example code and that is my blog only. And well, you
 have got the problem right. Now how can we find a solution for the
 flickering problem?

 --
 *Shreerang Patwardhan*

 ***Personal website:* Spatial
 Unlimitedhttp://shreerangpatwardhan.blogspot.com/







 On Wed, Aug 31, 2011 at 12:12 PM, Pil wolf...@gmail.com wrote:
  Yes, that's why the author didn't provide an example but instead was
  using pictures. I'm always sceptical when there is no example
  available.

  This code is all too simple to work properly, because as soon as the
  cursor hovers over an object inside the map the mouseout listener
  fires and tries to execute disableDefaultUI: true. And because the
  cursor is still on the map the mousemove listener fires immediately
  afterwards and tries to execute  disableDefaultUI: false. The
  presumable result is that the controls are flickering as long as the
  cursor tries to execute conflicting statements.

  The solution is not as easy as it sounds, because you have to avoid
  that a mouseout event will be fired when the cursor moves over a child
  element.

  On Aug 31, 8:12 am, Shreerang Patwardhan
  patwardhan.shreer...@gmail.com wrote:
   Hello Group,

   I put up an example to switch on and off the map controls on the mouse
  over
   and mouse out event. Which means, if your mouse if over the map, the map
   controls will be enabled and once the mouse is outside the map, the
  controls
   will disappear.

   You can find the code athttp://
  shreerangpatwardhan.blogspot.com/2011/07/playing-with-map-cont...

   Now, the problem is that when the mouse pointer is over the controls, the
   map controls become invisible and the mouse pointer keeps flickering
  along
   with the street view control. How do I get around this problem?

   Any help is greatly appriciated

   -- *
   Shreerang Patwardhan

   **Personal website:* Spatial Unlimited
 http://shreerangpatwardhan.blogspot.com/

  --
  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.

-- 
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] Polyline over marker

2011-08-31 Thread Martin Volek
Hi,
is it possible to show a polyline over markers on a map? I'm using Google 
Maps JavaScript API V3. I tried to set zIndex but in doesn't change 
anything.

Thanks

-- 
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/-/AHXJMb3IqMYJ.
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: Repositioning map controlers

2011-08-29 Thread Martin
You can add CSS styles to your cutom control, for example:

file.style.marginTop='5px';

Is that what you need?

Martin.


On Aug 30, 4:53 am, Jeremy jer...@pinkgeo.com wrote:
 H, that looks great but I'm running into a small snag.

 Code A places the image at the immediate right of the other controls:

 var file = document.createElement(DIV);
 file.innerHTML = img src='image.png';
 map.controls[google.maps.ControlPosition.TOP_LEFT].push(file);

 Code B places the image at the bottom of the other controls:

 var file = document.createElement(DIV);
 file.innerHTML = img src='image.png';
 map.controls[google.maps.ControlPosition.LEFT_TOP].push(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.



[Google Maps API v3] Re: onclick zoom level

2011-08-28 Thread Martin
Look at this page:

http://gmaps-samples-v3.googlecode.com/svn/trunk/geocoder/v3-geocoder-tool.html

Enter a place to search for and look at the result returned from
Google.

I'm pretty sure that not all results contain a viewport bounds (but
could be wrong!) so you'd have to test for it's presence and if
present you can use that with the Map fitBounds() method to better pan
and zoom your map.

See the documentation:

http://code.google.com/apis/maps/documentation/javascript/services.html#GeocodingResults

Martin.


On Aug 27, 5:19 pm, Jesus jesus.delaga...@gmail.com wrote:
 Hello,

 Is it possible to define the zoom level of a map on an javascript
 onclick link?

 What I'm trying to do with the zoom its to give individual zoom level
 per place as, in some cases, smaller cities needs more zoom than big
 cities. I hope this make this more clear.

 Different zoom level per onclick link and each onclick link will open
 a new map.

 Here's what I currently have:

 var buceriasHTML = 'img src=images/rn-bucerias.jpg height=80
 width=80 style=float: left; margin-right: 20px /

 strongBucerias,br /Nayarit/strong';

 lia onclick=findAddress('Bucerias, Nayarit, MX',buceriasHTML)
 style=color: #009; text-decoration: underline;
 cursorointerBucerias, Nayarit/a/li

 function findAddress(address, HTML) {
  if (HTML === undefined) {
    HTML = strong + address + /strong;
  }
  markerHTML = HTML;

        var geocoder = new google.maps.Geocoder();
    geocoder.geocode( { 'address': address}, function(results, status)
 {
      if (status == google.maps.GeocoderStatus.OK) {
        map.setCenter(results[0].geometry.location);
                addressSet = 1;
                startAddress = address;
                searchCenter = results[0].geometry.location;
                createMarker(searchCenter, 0, markerHTML, pin);
                var trafficLayer = new google.maps.TrafficLayer();
                trafficLayer.setMap(map);
                    getCategories(0);
                if (mapExtra === true) {
                        mapPost();
                }

        } else {
        alert(Geocode was not successful for the following reason: 
 + status);
      }
    });

 }

 So, each onclick link will open a new map and I'm looking to insert a
 proper default zoom level per link/map. Any ideas how can I do this?

 I was thinking on something like this:
 lia onclick=findAddress('Bucerias, Nayarit,
 MX',INSERTZOOMLEVELHERE,buceriasHTML) style=color: #009; text-
 decoration: underline; cursorointerBucerias, Nayarit/a/li

 Here's a link to my page with the 
 map:http://www.mundoregio.com/puntosdeinteres/mapa-rivieranayarit.html

 You will see below the map on the right side a 5 links and I want to include
 a zoom value to those links as this are very small towns so the map will
 really work better if I can give a street zoom value to each of those links.
 But I'll like to give a specific value per map so I can adjust it as need
 it.

 Thanks in advance for your help!

-- 
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: PHP Won't output XML at least I think that's the problem....

2011-08-23 Thread Martin
Or try  putting the Content-Type header statement before the 'require'
statement.

Martin.


On Aug 23, 6:39 pm, Radina radi...@gmail.com wrote:
 Problem could be in php include file

 filled in (phpsqlajax_dbinfo.php):

 ?
 $username=username;
 $password=password;
 $database=username-databaseName;
 ?

 You can try adding php ie

 ?php
 $username= .

 Aug 22, 6:08 pm, JKurtock jkurt...@gmail.com wrote:



  Yes, you ARE outputting something before the header() instruction.
  That is what the error code means.  In addition to the odd space here
  and there, a common problem is putting your initial ?php element on
  the second line, so that the code outputs a new-line before anything
  else (triggering your error message).  (Which is why none of us can
  find your problem by looking at the part of your code you have
  posted.)  Note that can be in  your included files too.

  You might try replacing the header() instruction with something like
  print G;, and then just looking at the output in a browser USING
  view page source.  If there is ANYTHING before the G; space,
  newline, etc., that is your problem. Then all you have to do is find
  where it is coming from.

  Good luck!

  - Jeff

  On Aug 22, 10:37 am, Cole colebrick...@gmail.com wrote:

    I have scoured the script for any blank spaces and have not found any,
   which leads me to believe I am outputting something before

   header(Content-type: text/xml);

   However, being new to HTML and PHP (though I have coded before) I can't 
   tell
   what is being output before that line of code...does it matter if I output
   in the HTML first or just the PHP? I have posted both my PHP and HTML 
   above,
   if anyone could give it a sweep through maybe they will catch something I 
   am
   over looking.

   Larry - As far as I can tell I have everything exactly the same as the
   example except for PHP line 3 (changed the file name to my file name, had 
   to
   add the 5 to .php according to my host, 1and1) and line 13 had to change 
   localhost to $hostname. Other than that no changes.- 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: PHP Won't output XML at least I think that's the problem....

2011-08-19 Thread Martin
Open the URL to your XML in a browser:

http://www.courtsofsorts.com/phpsqlajax_genxml.php

Now use the browser's View Source option and you'll see your XML - the
XML also validates so you have no problem there.

But the XML is being served with a Content-Type of 'text/html'.
I think your problem lies there.

The function downloadUrl() returns the 'request' onject to your code
and your code tries to use the request object's 'responseXML' property
which is 'null' or 'not defined' presumably because the XML has not
been served with the correct Content-Type of 'text/xml'.

Add the PHP code back into your script that creates the XML:

header(Content-type: text/xml);

Now load the map - does the request responseXML property now contain
the desired data?

Martin.


On Aug 19, 1:10 am, Cole colebrick...@gmail.com wrote:
 Thanks for the reply Martin, I appreciate your help!

 I did have that line of code in my script header(Content-type:
 text/xml); however I removed it because I thought maybe it was causing the
 problem based off of the statement below from the tutorial

 If you suspect there's a problem with connecting to your database, you may
 find it easier to debug if you remove the line in the file that sets the
 header to the text/xml content type, as that usually causes your browser to
 try to parse XML and may make it difficult to see your debugging messages.

 Maybe I misunderstood the above statement? I do believe I am connecting to
 the database becuase I ran a few if statements in phpsqlajax_dbinfo.php to
 test the connection and all seemed well.  

 If I posted the the genxml script would it help?

 Thanks -C

-- 
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: PHP Won't output XML at least I think that's the problem....

2011-08-14 Thread Martin
Your map has an error around line 31.

data.responseXML is null.

data.responseText is defined however and it's value is the text from
the database query.

http://www.courtsofsorts.com/phpsqlajax_genxml.php

That's being served with a text/html Content-Type, a Content-Type of
text/xml would be more appropriate and may mean that the responseXML
property you need is properly defined.

Look at the example again:

http://code.google.com/apis/maps/articles/phpsqlajax_v3.html

'Using PHP's domxml Functions to Output XML'

Did you include this line in your PHP script:

header(Content-type: text/xml);

Martin.


On Aug 15, 12:36 am, Cole colebrick...@gmail.com wrote:
 I am attempting to follow the Using PHP/MySQL with Google Maps tutorial

 http://code.google.com/apis/maps/articles/phpsqlajax_v3.html

 I have set everything up just as written but for some reason I can't get the
 finished product. I believe the problem may lie with the PHP script that is
 creating the XML, I am using the PHP DOM function to output but I am not
 sure if it is working. When I go to the link I don't see any XML output like
 the example shows so I think that is the issue. Below are the links to my
 site.

 http://www.courtsofsorts.com/http://www.courtsofsorts.com/phpsqlajax_genxml.php

 Also, I am new to Google maps so I am unsure what other data might be needed
 to help debug this issue, let me know and I will be glad to post.

 Thanks -C

-- 
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-29 Thread Martin
Just a thought.

Will a browser cache tiles served via a server-side script or not?

Any idea?

Martin.


On Jul 29, 5:43 am, John Coryat cor...@gmail.com wrote:
 Martin's suggestion is the standard way of doing it. Make a tile server that
 does this simple function and you'll notice your server runs faster.
 Processing a 404 is time consuming.

 If you'd like to see a Perl example, 
 seehttp://www.usnaviguide.com/ws-2008-02- look for download.zip

 -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-28 Thread Martin
Why not make all tile requests to a PHP script?

The script can check if the requested tile exists.
If the tile exists then the script can return it to the map, otherwise
it can return a blank transparent tile.

http://php.net/manual/en/function.file-exists.php

http://www.php.net/manual/en/function.file-get-contents.php

A transparent 1 x 1 pixel PNG image can be used where there is no tile
and that could be as small as 95 bytes:

http://code.martinpearman.co.uk/deleteme/transparent_1x1.png

Martin.


On Jul 28, 1:28 pm, Jason jason.wool...@gmail.com wrote:
 I'd really like to know a fix for this too. It's been a problem for me
 for quite a while and I can't easily get write permission
 to .htaccess.

 On Jul 27, 1:46 pm, Kesuke nick_dai...@hotmail.com wrote:







  I am using custom tile overlays on a map. To fetch the tiles I use the
  generic method:

   function createImageMapType(id, opacityvalue) {
      return new google.maps.ImageMapType({
        getTileUrl: function(coord, zoom) {
          return /tiles/ + id + /+ zoom + _ + coord.x + _ +
  coord.y + .png;
        },
        tileSize: new google.maps.Size(256, 256),
        isPng: true,
        opacity: opacityvalue
      });
    }

  Here is the problem: My map uses lots of transparent PNG tiles, and
  infact some tiles are completely transparent. So rather than have
  thousands of 3kb empty PNG files, I just don’t have those tiles.

  This works but it technically generates a lot of 404 bad request
  errors. An average user visit can make as many as 300 bad requests.
  This really hurts page load time and also looks bad for search
  engines.

  So, does anyone have an idea how I could only fetch tiles that
  actually exist?

  One other idea I have had is could I setup an .htaccess rule that
  redirects to a universal empty PNG file for any tile that can’t be
  found (so it doesn’t return a bad request).

  I don’t want to generate empty tiles as I have over 130 custom tile
  overlays for zoom levels 1 through 5. Just at zoom level 5 that would
  be something like 140,000 files and my server is limited.

-- 
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: Animated Zoom? (Like, panTo() only in zoom level?)

2011-07-24 Thread Martin
Let me add to that...

If the map user has browsed to an area of the map (either in the
current session or previously) then their browser cache will have the
tiles for that area in their browser cache.
A smooth animated zoom MAY be possible.

Otherwise the smoothness of any attempt at an animated zoom will be
entirely dependent upon how fast the user's computer can fetch the
tiles.

Network speed being beyond the control of the developer!

Martin.



On Jul 24, 1:39 pm, geocode...@gmail.com geocode...@gmail.com
wrote:
 On Jul 23, 4:47 am, br0k3n nttbro...@gmail.com wrote:

  Hi,
  Someone can share a working example of this (the constants and the
  functions mentioned in an answer earlier or for other complete code
  example)?

 What about Chris' reply was unclear?
 + Unfortunately there's no good solution to this at the moment.
 Because tiles
 + are loaded on demand, it's hard to smoothly animate between many
 zoom
 + levels.

   -- Larry







  i want to zoom in and zoom out for every marker found on the map of
  Google earth plugin.
  lets say i have 6 points on the map - how can i do a loop that zoom in
  to the point than zoom out to more higher view of the world and than
  zoom in to the next point in a loop again and again.
  thank you!

  On Jul 4, 8:11 am, Chris Broadfoot c...@google.com wrote:

   Unfortunately there's no good solution to this at the moment. Because 
   tiles
   are loaded on demand, it's hard to smoothly animate between many zoom
   levels.

   --http://twitter.com/broady

   On Fri, Jul 1, 2011 at 3:40 AM, Kivak littlewol...@gmail.com wrote:
Hello everyone!

I am trying to make a little animated intro to my map where, for
instance, you start at zoom level 4 and go to zoom level 17. Is there
a way to do that in Javascript?

I know there is a panTo() function, but I haven't found anything that
does the same for altitude.

Thanks a bunch!
-Kivak

--
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.

-- 
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: How to display Google map on entire screen

2011-07-20 Thread Martin
Look here for a good example:

http://code.google.com/apis/maps/documentation/javascript/tutorial.html#HelloWorld

Martin.


On Jul 20, 5:10 pm, Mustafa646 noorc...@gmail.com wrote:
 I want to display Google map on entire screen. It should be displayed
 on entire screen no matter whats the size of screen. What parameters
 should i use in div control ?

-- 
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: map.getBounds() returning nil

2011-07-18 Thread Martin
Could this be a timing issue - your map is not fully initialised?

http://code.google.com/apis/maps/documentation/javascript/reference.html#Map

try this:

google.maps.event.addListenerOnce(myMap, 'idle', function(){
 var bounds=myMap.getBounds();
 alert(bounds.toString());
});

Add such a listener to your code after the map is created - does
getBounds() now return the correct values?

Martin.



On Jul 16, 11:54 pm, SamSpade georgeleont...@gmail.com wrote:
 I have a Map object with a Center and Zoom set on it, but for some reason
 the getBounds() method still returns nil. Any ideas on what can be going
 wrong? For a (hopefully) short time you can see this behavior 
 onwww.motoalamode.comin the findSuitableStartLocationForDefaultRoute()
 method.

-- 
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: Possibilies of eventlisteners on Markers

2011-07-15 Thread Martin
Instead of resizing the map to make space for the new audio/video
content you could display that content in a Custom Control:

http://code.google.com/apis/maps/documentation/javascript/controls.html#CustomControls

Use CSS margin style to position the control exactly where you want it
and CSS display style to make the custom control visible or hidden.

Martin.


On Jul 15, 10:14 pm, Nico nico.jense...@googlemail.com wrote:
 Hello,

 I'd like to do two things when someone doubleclicks on an Marker and
 would like to know if it's even possible:

 - resize the Map (already tried it with google.map.event.trigger(map,
 resize), but it doesn't seem to work)

 - add dynamic video- and audiocontent (html5) beside the resized map.
 With dynamic I mean that the content should be related to what marker
 is doubleclicked on

 If it's not possible I'd like to know if theres some kind of
 workaround. Like opening a new Window instead of resizing the map or
 something like that.

 I'm sorry if my question seems stupid. I started programming
 JavaScript like 2 weeks ago and am still a big newb, but I'd
 appreciate if someone could help me out here.

 You can take a look at my sourcecode right 
 here:http://nicojensen.kilu.de/poiRecognition.html

 This is the part that doesn't work so far:
 google.maps.event.addListener(tempMarker, 'dblclick', function() {
         map.style.width = 50%;
         map.style.height = 50%;
         google.map.event.trigger(map, resize);
   });

 Thanks in advance,
 Nico

-- 
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: just started using Google Maps JAVAscript API v3

2011-07-12 Thread Martin
Look here too:

http://code.google.com/apis/maps/documentation/javascript/articles.html

Scroll down to API Basics, Using Markers and Using InfoWindows for
some good beginner tutorials.

Martin.


On Jul 12, 8:26 am, Luke Mahé lu...@google.com wrote:
 A good place to start is by reading the 
 documentationhttp://code.google.com/apis/maps/documentation/javascript/

 -- Luke







 On Tue, Jul 12, 2011 at 1:53 AM, dhan rrnee...@gmail.com wrote:
  Hi guys,
   I am not a programmer. I need help in using/installing the APIv 3
  after I have downloaded it.

  Can you provide me a step-by-step help on this.

  Thanks

  Ravi

  --
  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.

-- 
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] Infowindow vertical scrollbar instead of correct autosizing

2011-07-11 Thread Martin
Hi everyone,

this problem drives me mad and I couldn't find a satisfying answer by
googling. I have a lot of markers generated from a database. Every
marker has an onclick-listener, which opens an infowindow (there's
only one instance of this class) and displays some simple HTML
information. This works just fine. But the infowindow seems to
calculate the height of the content incorrect and so there is this
scrollbar I want to get rid of. The bar appears in FF, Chrome and IE9,
so I don't think its a browser issue.

Example: http://portal.sef-energietechnik.de/ref-test

Here is a snippet of marker generating code:

function createMarkers(xml){
var markerNodes =
xml.documentElement.getElementsByTagName(marker);
var infowindow = new google.maps.InfoWindow({maxWidth:300});

for (var i = 0; i  markerNodes.length; i++) {
[...]   //reading the data from xml

var marker = new google.maps.Marker({
position: latlng,
title: name,
type: type,
typeText: typeText,
infoHtml: html,
icon: markerImagesPath + markerImages[type]
});

marker.setMap(map);

google.maps.event.addListener(marker, 'click', function() {
infowindow.close();
infowindow.setContent(this.infoHtml);
infowindow.open(map,this);
});
}
}

-- 
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: Infowindow vertical scrollbar instead of correct autosizing

2011-07-11 Thread Martin
Sorry to bother you again, but this didn't solve the whole problem. At
first I was happy, but then I discovered, that it only worked for this
particular marker. There dozens of others where it doesn't. The
following page shows the lot: 
http://portal.sef-energietechnik.de/unsere-referenzen/

The problems seems to appear, when the smaller text uses more than one
line.

Any toughts? I can't be the only one using HTML inside the infowindow,
can I?

Greetings, Martin

-- 
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: Infowindow vertical scrollbar instead of correct autosizing

2011-07-11 Thread Martin
Yes, it does come with the data. I tried it with inline style. As you
can see, not very successfully...

The parsed xml looks like this (description tag is the interesting
part):

marker name=EEA Plauen type=Energietechnik
typeText=Energietechnik lat=50.4987970545076
lng=12.136115684082
description
![CDATA[div style=padding:5px;
div style=font-size:1.4em;margin-bottom: 5px;EEA 
Plauen/div
European-Energy-Award-Beratung/div]]
/description
/marker
marker name=BHKW-Overath type=Blockheizkraftwerke
typeText=Blockheizkraftwerke lat=50.9291659459865
lng=7.28388424115371
description
![CDATA[div style=padding:5px;
div style=font-size:1.4em;margin-bottom: 
5px;BHKW-Overath/div
Hallenbad / public poolbr1 x Erdgas-BHKW G3000A/div]]
/description
/marker

-- 
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] Fixed Layer above Map Tiles

2011-07-05 Thread Martin Kleppe
Hi all,

I want to create a gradient overlay on top of the tile layer that is
fixed and not moving with the map. The markers should be fully
interactive, so i tried to add a custom tile layer that sticks to the
top left of the page: http://www.ubilabs.net/assets/81/gmaps_fixed_layer.html

But I can't figure out how to observe the movement after throwing
the map. There is still a momentum between the latest drag and the
idle event.

Did you know how to fix this? In V2 a move event was fired, possibly
repeatedly, while the map view is changing but V3 doesn't provide it
anymore.

Thanks for your help!
- Martin



-- 
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: About Storing markers

2011-06-28 Thread Martin
LOL

On Jun 28, 12:18 pm, en4ce djen...@googlemail.com wrote:
 how familiar are you with php/ajax/javascript?

 if you want this fast and for a client you better get a freelancer
 doing the job (in case, write me a email, cheers)

 On 28 Jun., 10:13, Rohan Shah shhroha...@gmail.com wrote:







  hi all,
  i am new to this community.

  Can i anyone help me with storing markers to the map so that every
  time map is loaded in the browser it shows all the pre-defined
  markers... which may help user get to nearest marker place from his
  current location.?

-- 
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.



Re: [Google Maps API v3] Street View custom supertiles problem

2011-06-26 Thread Jan Martin
Hi,

I run the site in question:
http://www.diy-streetview.com

Test-link:
http://www.diy-streetview.com/googleapi

The super tile is available:
http://s3.amazonaws.com/diy-20110418-googleformat2/000260/0-0-0.jpg

In Firefox, there is a right click Menu View page Info. 
On Media tab I see these tiles loaded:

http://s3.amazonaws.com/diy-20110418-googleformat2/000260/3-5-1.jpg
http://s3.amazonaws.com/diy-20110418-googleformat2/000260/3-5-2.jpg
http://s3.amazonaws.com/diy-20110418-googleformat2/000260/3-4-1.jpg
http://s3.amazonaws.com/diy-20110418-googleformat2/000260/3-4-2.jpg
http://s3.amazonaws.com/diy-20110418-googleformat2/000260/3-5-0.jpg
http://s3.amazonaws.com/diy-20110418-googleformat2/000260/3-4-0.jpg
http://s3.amazonaws.com/diy-20110418-googleformat2/000260/3-3-1.jpg
http://s3.amazonaws.com/diy-20110418-googleformat2/000260/3-3-0.jpg
http://s3.amazonaws.com/diy-20110418-googleformat2/000260/3-3-2.jpg
http://s3.amazonaws.com/diy-20110418-googleformat2/000260/3-2-1.jpg
http://s3.amazonaws.com/diy-20110418-googleformat2/000260/3-2-0.jpg
http://s3.amazonaws.com/diy-20110418-googleformat2/000260/3-2-2.jpg

Is this the expected behavior?

Jan

-- 
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/-/nmeo3eABKdQJ.
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: Accessing innerHTML of a div in a custom control

2011-06-23 Thread Martin
Hi.

I tend to use something like this when i need to wait for an element
to exist in the DOM before i can manipulate it:

function waitForDOM(){
 if(document.getElementById('myDiv')){
  // do something with the div
 } else {
  setTimeout(waitForDOM, 250);
 }
}

// start it going
waitForDOM();

Martin.


On Jun 23, 12:00 pm, RoyHB roy.bar...@gmail.com wrote:
 Thanks Pil.

 The page I posted is just to demonstrate the issue.  In the actual
 application there are several places where large and complex bits of html
 are used within objects.  For the production world I build the html into
 files that I include via php pre-processing.  I've just found it easier to
 maintain these files as text rather than as strings.  When I load them I do
 so via statements like:

 var myHTML = '?php $myHtmlFile = fopen(Logo_HTML.txt,r);$logoHTML =
 fread($myHtmlFile , filesize(Logo_HTML.txt));echo $logoHTML?';

 I'll try to add something to the demo that will allow me to trigger the
 attempt to access LatLonTxt after the page has finished loading and see it
 that works.

 Cheers;
 Roy

-- 
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: Accessing innerHTML of a div in a custom control

2011-06-23 Thread Martin
That example is no bodge job!

It'll poll the DOM til the element that you want to manipulate exists
and then manipulate it - end of story.
Change the poll frequenqy - maybe set a limit to the number of times
that the timeout will execute before it gives up.

The Google Maps API doesn't trigger many (or even any) events to let
you know that it has created a DOM element 'sometime' after you asked
it to.

Martin.


On Jun 23, 1:30 pm, Paul Smith papadeltasie...@googlemail.com wrote:
 I've never been a big fan of wait for sometime and hope code, although I
 appreciate it often works :-).  Is there a more rigourous way to achieve
 what you are doing, i.e. wait for the DOM to create the object?

 And on a general Javascript theme, there seem to be lots of instances where
 a script requests something and then a callback indicates it has completed.  
 Do people tend to just chain request, wait for callback, request, wait for
 callback..., or request it all, each callback checks if everything is
 done?  Or is there a cunning you requested lots of things and now they are
 ALL done Javascript mechanism which I've not come across yet?

 Thanks,
 Papadeltasierra

-- 
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: Getting DOM nodes from a custom mapType

2011-06-20 Thread Martin
Can't you keep a reference to the node when your getTile() method
creates it?

Or am i missing something..?

Martin.


On Jun 20, 7:25 am, Chris Broadfoot c...@google.com wrote:
 This is definitely not supported by the API. Could you switch between two
 different (buffered) map types?

 --http://twitter.com/broady







 On Sun, Jun 19, 2011 at 2:37 AM, John Coryat cor...@gmail.com wrote:
  I'm trying to change the tile URL's of a custom mapType and need to know
  how to get to the DOM for those objects.

  Does anyone know the secret?

  -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/-/utTI6g_Udu8J.
  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.

-- 
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: Changing default location when no nearby stores

2011-06-20 Thread Martin
Try this:

function searchLocationsNear(center) {
  clearLocations();

  var radius = document.getElementById('radiusSelect').value;
  var searchUrl = 'phpsqlajax_search.php?lat=' + center.lat() +
'lng=' + center.lng() + 'radius=' + radius;
  downloadUrl(searchUrl, function(data) {
  var xml = parseXml(data);
  var markerNodes =
xml.documentElement.getElementsByTagName(marker);

  if(markerNodes.length0){

   // heres the original code
   var bounds = new google.maps.LatLngBounds();
   for (var i = 0; i  markerNodes.length; i++) {
 var name = markerNodes[i].getAttribute(name);
 var address = markerNodes[i].getAttribute(address);
 var distance =
parseFloat(markerNodes[i].getAttribute(distance));
 var latlng = new google.maps.LatLng(
 parseFloat(markerNodes[i].getAttribute(lat)),
 parseFloat(markerNodes[i].getAttribute(lng)));

 createOption(name, distance, i);
 createMarker(latlng, name, address);
 bounds.extend(latlng);
   }
   map.fitBounds(bounds);
   // end of original code

  } else {
   // here set a default map view here as no nearby markers were found
  }
 });
}

It simply checks if there are any marker nodes returned to the map
from your database - if nodes exist then create the markers else set a
default map view.

Martin.

On Jun 19, 9:08 pm, tarscott tarscottmi...@gmail.com wrote:
 hi,

 i have the store locator demo running (http://code.google.com/apis/
 maps/articles/phpsqlsearch_v3.html).

 it works, except when i geocode an address without a corresponding
 nearby store location in database (100 miles away), the map defaults
 to lat 0, lng 180 (middle of Pacific Ocean).

 just learning javascript. can anyone point in me in the right
 direction for how to change this?  i would like the map to default to
 the original geocoded address even if there's no nearby location, like
 the Ace example.

 - tim

-- 
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: Help with world coordinate to pixel location on tile

2011-06-13 Thread Martin
Hi.

http://code.google.com/apis/maps/documentation/javascript/maptypes.html#WorldCoordinates

World Coordinates range from 0 to 256 for both x and y values.
At zoom level 0 those world coordinates are the same as the pixel
coordinets that you want.

At higher zoom levels simply take each x and y value and multiply by 2
to the power of the zoom level.

Martin.


On Jun 12, 10:42 pm, Ben xb3...@gmail.com wrote:
 Hi,

 I am having trouble going from the 'world coordinate' to the pixel
 location on the tile. From my understanding of the docs the x and y
 value from the world coordinate are mapped to the tile's x and y
 pixel? When I add a pixel to that location on the tile, it is off from
 the latlng location. ( the marker location ) I based my testing on the
 example from the link below. The world coordinates seem correct.

 http://code.google.com/apis/maps/documentation/javascript/examples/ma...

 The one thing I do notice is that the world coordinate can't be an
 exact xy of the tile since when i change the maptype to base, it isn't
 at (65,95) on the tile.

 Any idea what my issue might be?

 Thank you in advance.

-- 
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] Missing methods / features in v3 - Do I have to add them by my own?

2011-06-01 Thread martin
Hi there,

I currently want to migrate an existing application using the v2 API to the 
new v3 API. Mainly the application uses the GPolyline() Object to let the 
user draw lines and tracks and store the data of the drawed polyline into 
the database. In the v2 API there are many useful methods like 
deleteVertex(), enableEditing(), getBounds(), etc. I'm missing these methods 
in the new v3 API. So I search the web for more options and did not found 
anything about this. 

So my main question is: do I have to implement these missing methods by my 
own? 

For example: in our current application the user draws a line with the 
GPolyline() Object. If he klicks on the icon of the starting point the track 
were automatically closed by the event endline. This event is not 
available in the v3 API. So I have to check by every click if the user 
clicks on the starting point, therefore I have to iterate over the whole 
MVCArray stored in the new google.maps.Polyline() object. That seems a 
little bit wired and complicated to me. 

Can anybody tell me why these methods aren't available in the v3 API?

Thanks a lot!
Martin

-- 
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/-/eFdaUFBEekwtSFVK.
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: Placing marker at a pixel coordinate

2011-05-28 Thread Martin
Have you seen this page:

http://code.google.com/apis/maps/documentation/javascript/maptypes.html#CustomMapTypes

You say that you have many (cartesian?) coordinates already - what is
the range of these coordinates?
Could you normalise all your coordinates so X and Y values range from
0 to 256?
If you could do that then your coordinates would essentially be what
Google call 'World Coordinates'.
With world coordinates you can then use built in API methods to
convert world coordinates to and from both pixel coordinates and
geographical (lat, lng) coordinates.

Your google.maps.Map object has a getProjection() method:

http://code.google.com/apis/maps/documentation/javascript/reference.html#Map

That returns the map's projection, the projection has two methods:
fromLatLngToPoint() and fromPointToLatLng() that will do these
conversions for you:

http://code.google.com/apis/maps/documentation/javascript/reference.html#Projection

If your knowledge of javascript is advanced you might even consider
writing your own 'cartesian projection'.
The cartesian projection would work directly with cartesian (x, y)
coordinates with no need to convert to geographical (lat, lng)
coordinates:

https://groups.google.com/group/google-maps-js-api-v3/search?hl=engroup=google-maps-js-api-v3q=create+new+projectionqt_g=Search+this+group

Martin.



On May 29, 12:26 am, Jason Kaczmarsky jkaczmar...@gmail.com wrote:
 I think I'm on the right track. In the getTile function it creates all
 the tiles for the map and returns each of them. Obviously each tile is
 placed accordingly on the page. My idea was to fetch this position in
 the getTile function and when I view a tile DIV it does show the
 position on the page. However, the div does not get created in getTile
 so it has no position yet, it returns it to another function so I
 cannot access the position. What does getTile return to? I think if I
 try to access the position from there, I can get it all working.

 On May 28, 7:00 pm, Jason Kaczmarsky jkaczmar...@gmail.com wrote:







  Alright I got something figured out. I found out how to calculate the
  tile at which a certain point it located based on the zoom level. I
  still don't understand how I can translate the tile/point position to
  workable coordinates.

  I believe if I can get a particular tile's position relative to the
  window position, I can then get the difference and draw a marker based
  on that.

  Don't know if it's obvious, but I'm working in JavaScript and I would
  like to draw a div at each point. If I can get the relative position
  of a tile to the window, I can absolutely position a div relative to
  the tile's X/Y values in the window.

  On May 28, 6:05 am, John Coryat cor...@gmail.com wrote:

   You can convert a pixel coordinate into a latitude and longitude fairly
   easy. One thing you need to consider. All pixel coordinates are based on a
   particular zoom level. If all your pixel coordinates are assuming one 
   static
   layer, you'll have to figure out what corresponding zoom that represents 
   and
   calculate latitude and longitude based on that.

   Here's a Perl module with the tile math.

  http://www.usnaviguide.com/google-tiles.htm

   Hope that helps.

   -John Coryat

  http://maps.huge.info

  http://www.usnaviguide.com

  http://www.zipmaps.net

-- 
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: Placing marker at a pixel coordinate

2011-05-28 Thread Martin
Here's another link for you:

http://econym.org.uk/gmap/customflat.htm

It uses version 2 of the API so not entirely useful to you, but it
does show the theory of creating a cartesian projection.

Note that a cartesian projection will draw your cartesian coordinates
exactly where they should be, using the API's built in Mercator
projection could cause problems as it will assume your game's surface
is a sphere and make appropriate corrections.

Martin.


On May 29, 5:48 am, Martin™ warwo...@gmail.com wrote:
 Have you seen this page:

 http://code.google.com/apis/maps/documentation/javascript/maptypes.ht...

 You say that you have many (cartesian?) coordinates already - what is
 the range of these coordinates?
 Could you normalise all your coordinates so X and Y values range from
 0 to 256?
 If you could do that then your coordinates would essentially be what
 Google call 'World Coordinates'.
 With world coordinates you can then use built in API methods to
 convert world coordinates to and from both pixel coordinates and
 geographical (lat, lng) coordinates.

 Your google.maps.Map object has a getProjection() method:

 http://code.google.com/apis/maps/documentation/javascript/reference.h...

 That returns the map's projection, the projection has two methods:
 fromLatLngToPoint() and fromPointToLatLng() that will do these
 conversions for you:

 http://code.google.com/apis/maps/documentation/javascript/reference.h...

 If your knowledge of javascript is advanced you might even consider
 writing your own 'cartesian projection'.
 The cartesian projection would work directly with cartesian (x, y)
 coordinates with no need to convert to geographical (lat, lng)
 coordinates:

 https://groups.google.com/group/google-maps-js-api-v3/search?hl=engr...

 Martin.

 On May 29, 12:26 am, Jason Kaczmarsky jkaczmar...@gmail.com wrote:







  I think I'm on the right track. In the getTile function it creates all
  the tiles for the map and returns each of them. Obviously each tile is
  placed accordingly on the page. My idea was to fetch this position in
  the getTile function and when I view a tile DIV it does show the
  position on the page. However, the div does not get created in getTile
  so it has no position yet, it returns it to another function so I
  cannot access the position. What does getTile return to? I think if I
  try to access the position from there, I can get it all working.

  On May 28, 7:00 pm, Jason Kaczmarsky jkaczmar...@gmail.com wrote:

   Alright I got something figured out. I found out how to calculate the
   tile at which a certain point it located based on the zoom level. I
   still don't understand how I can translate the tile/point position to
   workable coordinates.

   I believe if I can get a particular tile's position relative to the
   window position, I can then get the difference and draw a marker based
   on that.

   Don't know if it's obvious, but I'm working in JavaScript and I would
   like to draw a div at each point. If I can get the relative position
   of a tile to the window, I can absolutely position a div relative to
   the tile's X/Y values in the window.

   On May 28, 6:05 am, John Coryat cor...@gmail.com wrote:

You can convert a pixel coordinate into a latitude and longitude fairly
easy. One thing you need to consider. All pixel coordinates are based 
on a
particular zoom level. If all your pixel coordinates are assuming one 
static
layer, you'll have to figure out what corresponding zoom that 
represents and
calculate latitude and longitude based on that.

Here's a Perl module with the tile math.

   http://www.usnaviguide.com/google-tiles.htm

Hope that helps.

-John Coryat

   http://maps.huge.info

   http://www.usnaviguide.com

   http://www.zipmaps.net

-- 
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] Disable animated zoom

2011-05-26 Thread Martin
Has anyone else noticed that all zoom changes are now animated and
have been animated since version 3.4 (i think)?

I was hoping that there would be an option that could be set to
disable animated zoom changes but have found nothing.

The API changelog mentions nothing about zoom changes being animated
from version 3.4 or any other version:

http://code.google.com/p/gmaps-api-issues/wiki/JavascriptMapsAPIv3Changelog

So i have created a new feature request:

http://code.google.com/p/gmaps-api-issues/issues/detail?id=3371

Anyone that would like this feature please star the request.

Thanks.

Martin.

-- 
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: Disable animated zoom

2011-05-26 Thread Martin
I think the animation effect when zooming more than one level gets
crude and ugly!
(Although the animation effect is entirely dependant on what tiles are
visible before the zoom change, so the animation effect varies from
acceptable to crude).

Comment #5 on this page says much the same:

http://code.google.com/p/gmaps-api-issues/issues/detail?id=3033q=continuous%20zoomcolspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Stars%20ApiType%20Internal

I think this is really a question though of personal taste - but it
would be good if developers could cater for a client's personal taste.

We have animated or non-animated options for changing the map center
so why not have similar options for changing the map zoom?

Martin.


On May 26, 3:04 pm, Chris Broadfoot c...@google.com wrote:
 On Thu, May 26, 2011 at 10:35 PM, Andrew Leach 
 andrew.leac...@gmail.comwrote:

  But are they the same issue? One is complaining that markers are
  zoomed (which is fairly obviously a fault); the other is requesting a
  way to stop zoom animation. They are related -- if a zoom is not
  animated then markers are unlikely to be zoomed -- but it seems to me
  that they are not the same at all.

 Oops! Sorry about that. You're right, they're different issues.

 Can you guys please clarify *why* you don't want the map to zoom the tiles?

 Is it specifically the undesired effect you get from zooming in many levels?

 --http://twitter.com/broady

-- 
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.



  1   2   3   >