How do I remove 'Earth' button from Google Maps? - google-maps

I'm using the Google Maps generator to create a few maps for a client. The maps embeded on the site are a bit small (255x176), so map real state is crucial. I've already removed the balloon, but can't find a way to remove the "Earth" view button from it (all newly generated maps come with it now, 4 views in total).
The annoying part is that the "Earth" view requires a Google Earth plugin to be used anyway, something the client could live without - me too.
Any advices there? Feedback will be greatly appreciated!
Cheers,
Wallace

You may customize the map controls using the MAPS API.
Visit http://code.google.com/apis/maps/documentation/javascript/controls.html#DefaultUI
Look for MapTypeControlOptions and pass appropriate map type you want to show.
Refer http://code.google.com/apis/maps/documentation/javascript/reference.html#MapTypeControlOptions
http://code.google.com/apis/maps/documentation/javascript/reference.html#MapTypeId

If using the default UI, you would get only the map types in G_DEFAULT_MAP_TYPES, which does not include the Earth map type (G_SATELLITE_3D_MAP).
This means your generator is adding this map type explicitly. So you should be able to simply look for G_SATELLITE_3D_MAP in the javascript you get from the generator, and remove references to it.
If you are still having troubles, can you provide a link to the map generator you are using?

Related

Add custom label to a google maps URL with GPS point

There are numerous SO questions on how to build a URL with a custom GPS location in a google maps URL.
But I can't find something where I can add a custom label to my point.
E.g. I can show a marker by building a URL like this:
http://maps.google.com/maps?q=24.197611,120.780512
But it's just an unnamed point. Can I add a custom label? Like "MyHouse"?
I actually want to add multiple points each with it's own label.
Something like:
http://maps.google.com/maps/dir/24.197611,120.780512//24.297611,121.780512//24.117611,120.180512
and then call the 3 points: House1, House2 and House3
Although you can pass map parameters thought the URL it appears as though changing the marker icon is not an option.
Google Maps URL Docs
You can change the marker icons with the Maps JS API.
Android Intents support label parameters, but the Maps URL currently does not support them. Check out this Stack Overflow post about it
Hope this helps.
I would suggest filing a Feature Request in our Issue Tracker will be a good idea.
Issue Tracker is a tool used internally at Google to track bugs and feature requests during product development. It is available outside of Google for use by external public and partner users who need to collaborate with Google teams on specific projects. You can learn more here.
Bing map does allow add a pin with label with url parameter:
https://www.bing.com/maps?cp=${mapCenterLat}~${mapCenterLon}&lvl=${zoomLevel}&sp=point.${pinLat}_${pinLon}_${name}_${description}_${linkUrl}_${photoUrl}
The name and the following parameters are optional.
However, allow add label could be a dangerous decision,
frauds may add misleading label to the map or on the wrong position.
Bing map docs

how can I create a custom google map (of a place that does not exist)

Is it possible for me to create a custom map using Google Maps APIs of an imaginary place?
Are there examples of uses like that?
It would be of a group of islands, part of a story i'm writing...
If it is possible, are there exemples online?
Thanks!
Daniel
The Google Maps Javascript API allows you to create a map and supply custom map tiles.
An example, the first I could find, is: http://maps.marlam.in/.
It's not easy and requires quite a lot of PNGs (if you want detail), but a description of how this particular example was built can be found here
I would recommend a Google Maps API tutorial: https://developers.google.com/maps/documentation/javascript/tutorial
You should take a look at the chapter about Image Map Types
And here you have a working example.

Convert google map v2 custom overlay to v3 custom overlay

I have been doing so much research and yet to find the exact answer to help me. I need to convert my map at http://www.uaf.edu/campusmap/ from V2 to V3 so I can try to combine it with my fusion tables. It uses tiles made by Map Tiler. Is there anyone who can help me out?
I guess you need to port the whole map to V3 and use Custom Map Types.
BTW, you're loading the API twice, once from http://www.uaf.edu/files/campusmap/ and then again from http://www.uaf.edu/files/campusmap/campusmap-122311.html -- which is loaded in an iframe. Probably better to remove one of them, I think you can get rid of the first one.
I think there are two main things you'll need to worry about when converting to v3:
GTileOverlay doesn't exist in v3. You can use Custom Map Types, as per the pp.
To do this, you'll want to make an ImageMapType (see the docs). You'll then need to add this to the Map.overlayMapTypes MVCArray (which will display it above the base map - Map reference).
There's nothing like GDownloadUrl and GXml for downloading and parsing an XML document in v3. You'll need to use a generic library like jQuery to help downloading your marker locations.

Getting a GPS coordinate from a text hint of the location?

I am working on a location-based service platform, that will be coordinate based. In ideal situations, I can have the GPS grab the coordinates. However, I would like to have a fallback where I would have an autocompleting text field in which a user can input the address/name of the place. The autocomplete dialog would try to make a smart guess what the place is, just like how it would work in Google Maps when you try to search for a location.
Is there an API for this?
You can use the Google Places API.
There is also a handy jQuery plugin called geo-autocomplete that can help you with this.
See also the Google example, and documentation.

Do i need use google maps api only to embed litle map with route calculator/display for only one destination?

Well i want to upgrade contact page with dynamic map showing location and give oportunity to calculate route for comapny headquatters. Id it necessery for such simple task use Google api? i mean here generating akey etc? Fo i have any other alternatives to google maps?
There's really no reason to mess with the API at all unless you need to customize the appearance or behavior of gmaps. Why not just use an iframe with a url of:
http://maps.google.com/?q=[you-url-encoded-address-here]
or better yet, set up a textbox and a 'get directions' button to redirect that frame to:
http://maps.google.com/maps?saddr=[their-address]&daddr=[your-address]
edit: this works well in modal dialog if you don't want the google logo sticking out like a sore thumb in your pageflow
You could probably embed directly with a specific URL that will configure it to have the destination you want.
By the way, well written answers are much more likely to receive useful responses here.
You could consider http://www.openlayers.org/ as an alternative to google maps.
In fact open layers can be used to add a Google map, or an OpenStreetMap map or a Bing map, etc.