Draggable overlay on Google Maps in a browser - google-maps

I have developed an iOS application that allows the user to drag a GMSOverlay subclass around in the Google Maps SDK. The overlay scales with the map as the user zooms in and out.
I want to replicate this in the browser but can't find examples of how to do it. Today I happened to see a web page where this was done.
Draggable overlay example
If anyone has any ideas about how this is achieved (generally speaking - I will research from there) it would be appreciated!

The Google Maps API zoom_changed event and getZoom() method will let you track changes in zoom, which can be used to scale DOM elements.

Related

image overlay on Ti.Map of Titanium

I am making application on Titanium for iOS and android.
This application uses Ti.Map.
I would like to add image on Ti.Map (google map or apple map)
I have confirmed googlemap API has this function like this below.
Adding a Custom Overlay
I have checked methods of Ti.Map and found createCircle or createPolygon....However these methods are not what I want.
Can I add image as overlay on Ti.Map of Titanium????
No. Ti.Map is very basic and only provides for polylines, polygon and marker additions, but not customizing of the view. If it were possible, it would be only on Android because that is Google Maps.
For your cause, I suggest you add a webview to your app, and use the JavaScript API of Google Maps to fix this. And within this webview add a full size Google Map, so you will not see any borders whatsoever. Should work perfectly fine!

How to display blue arrow for direction with Google Maps SDK in iOS?

When launching Google Maps in iOS, the App will display a blue dot for my location and a blue arrow for direction I faced.
Is it possible to display the blue arrow with Google Maps SDK in iOS ?
If SDK does not provide this function, is there any way to implement it by myself ?
I've spent a good amount of time researching this and the simple answer is no. I've combed through every page of the google maps iOS sdk documentation and have found nothing on user location direction. I have tried laying an arrow image on top of the mapView, but the problem is that the user dot does not always stay in the exact center, and there is no way to reference the location of the dot within the mapView. It seems that this is one feature that Google is keeping to themselves for some reason :(

Google Maps streetview shows awesome panoramio photos in China - can we do this?

If you have a look at Google Maps and search for some place in China like Tiananmen Square for example, then drag out the little streetview man, he does not go on the roads like normal... instead there is a scattering of little blue dots where he can stand and get a view.
This is similar to a panoramio layer but much slicker, and it lets you click between photos taken within the same field of view.
This is all great, except when I turn on the streetview control with Google maps API v3 on the website I'm developing (which is about tourist destinations in China), it lets you drag the man around but then he turns grey like there is no data. There are no blue dots and he can't see anything.
I'm wondering if there is a way to turn on that same streetview panoramio mode that they have in maps.google.com? Possibly they won't let us have access to that yet....
I could add a normal panoramio layer but I am really wanting to have that really nice blue dot thing happening.
Pretty sure no. v3 of the API implements streetview with HTML5/canvas etc - ie native in the browser.
That 'lookaround' viewer, is implemented in flash.
I suppose you could try v2 of the API, that still uses a flash client.
... otherwise just add a request to the Google Maps API issue tracker - it tracks suggestions.

display custom tile for missing tiles in google maps app

I am working with google maps in flash, and i would like to know how to serve up my own image tile for the "we have no imagery at this zoom level..." error.
I dont want to serve up an entire map of images - just for the times when google has no image
does the tile layer base dispatch an event? (i couldnt find any in the api)
is there a method that can be overridden by extending the tilelayerbase class
any help appreciated
http://gmaps-samples-flash.googlecode.com/svn/trunk/demos/CustomMapRoadTrip/CustomMapRoadTrip.html
I'm pretty sure this does what you need ^ ?
http://code.google.com/apis/maps/documentation/flash/forum.html?place=topic%2Fgoogle-maps-api-for-flash%2Ft7oYId6UeI0%2Fdiscussion

how does google maps render the map etc, is it flash a java applet?

how does google maps render the map etc, is it flash a java appelet?
A bit more detail, google maps uses a big div element to contain several img elements. each of those img elements is 256 pixels square, and is positioned on a regular grid. from there, the google maps javascript program calculates which grid images should be loaded into each img tag and uses regular dom manipulation to position each img in the right place. Only the tiles of the map that would be visible inside the div are loaded. when you scroll off the side, the javascript library unloads the image, and loads new ones as needed. Other elements, like the zoom controls, markers, and lines, are stacked or drawn on top of that as needed.
It's all HTML and Javascript, plus a lot of video trucks, satellites (and airplanes?), and google magic.. More information:
How does Google Maps work?
No, it is all based on JavaScript and AJAX.
To oversimply... A small script tag is embedded in the HTML which points to a big .js file over at Google. This contains a whole lot of JavaScript that builds the "map box", downloads the map images, and does things when you move your mouse around and click on stuff.
Google Maps is done via fancy JavaScript if I'm not mistaken. If you don't already have it, install Firebug in Firefox and "Inspect" the map at Google Maps, and you'll see that it's a bunch of images together, with JavaScript to provide the functionality.
It is neither flash nor a java applet. It is simply HTML, CSS and images with a great deal of javascript to drive the interactive elements.
Please see the Google Maps API for instructions and examples on how to create and integrate the google maps widget.
http://code.google.com/apis/maps/