World vectorial map including states and cities map - google-maps

I have a project (commercial) where i need a map with an overlay that i can click and have an action.
The main issue is that this map should be only the borders and the name of the locality, which from what i discovered neither google maps or other maps service offer.
Other sources of data like http://www.naturalearthdata.com/ are not very reliable because they miss a lot of information and usually they provide information only about a few countries.
Example: http://mtbo16.fpo.pt/mtbo/files/loc/loc_en.html
I need exactly the example from the url, except that i need to show only borders and names.

With Google Maps API you have an option to style the maps:
https://developers.google.com/maps/documentation/javascript/styling
So you can hide everything except locality names and borders on your map. Please have a look at this example: http://jsbin.com/nepode/edit?html,output
You can create your custom style using this wizard:
https://mapstyle.withgoogle.com/
Hope it helps!

You can take a look at this: http://vectormap.info/category/free_vector_maps_downloads/free_vector_world_maps/ what I did is the opposite, hide the map layers but you can have the option to show & you can change the background style, etc. I don't know, up to you just take a look, might be useful

Related

Is it possible to have street names / roads on top of an image overlay in google maps?

Is there a way to insert the image overlay a layer below the streets but on top of the map background? The roads can be individually styled, so it should technically work, but I haven't been able to find the option for it.
The only lead I have found so far is this question: Google Maps API - Overlay Custom Roads
Which unfortunately doesn't really solve the problem of having to manually enter the street info.
I'm currently working on a custom map for a whole city and manually illustrate all the streets and enter the street names would take an enormous amount of time.
Any info would be very appreciated, thanks!
Try to check this documentation about Styled Maps. Styled maps allow you to customize the presentation of the standard Google base maps, changing the visual display of such elements as roads, parks, and built-up areas.
Here you can also find some sample code that you can use in your sample code.
Also you can find here the Styled Map Wizard.
Creating styles by hand and testing your code to see how they look is potentially time-consuming. Instead, you can use the Styled Map Wizard to set up the JSON for your map's styles. The wizard allows you to select features and their elements, apply operations to those features, and save the styles to JSON, which you can copy and paste into your application.

add an address search to a custom google map

I am using the new google maps system and an embedded iframe to add my google map into my page with my custom locations.
What I am missing is a way to have a user search their address to see which location is nearest them.
The map lists local Disc Golf courses and I would like to incorporate a search bar that allows you to put in your address so you can see how close you live to the nearest course.
Any idea on how to accomplish this?
Here is my current iFrame code:
<iframe src="https://mapsengine.google.com/map/u/0/embed?mid=zgauQ93-BexQ.kryT1881iie4" width="640" height="480"></iframe>
Displayed on the site:
http://atxdiscgolf.com/
As you can see... no search bar! I want to be able to search addresses on this map so I can see how close they are to home! Please let me know!
Also let me know if you have any Disc Golf courses to add to my list!
I figured out how to do it!
First, I used the "sample code" found here:
https://developers.google.com/maps/documentation/javascript/examples/places-searchbox?hl=fr
Then I read about KML layers so...
https://developers.google.com/maps/documentation/javascript/examples/layer-kml
I went to My Maps, clicked export as KML, checked to update when my map updates then directed the KML to the file location that I downloaded the KML file from from My Maps.
It worked! I have a searchable map with my custom overlay embedded!!
It won't let me post more than 2 links so I will post the link to my fiddle in the comments below:
Check out the sample code in the documentation. It adds a search box to the map, which is what it sounds like you're looking for. If you want to be able to get directions or calculate distances, you may have to use other libraries/apis, though Google Maps v3 does already have a lot of the methods already (like computeDistanceBetween).

Google Maps with night view?

Is it possible to use with google api v3 something similar to this: https://earthbuilder.google.com/10446176163891957399-13737975182519107424-4/mapview/
Should I use google map engine to apply the night view overlay?
Please advice
The link no longer works, but assuming you want something like Google Maps' "night mode" (that automatically activates when navigating during night), yes, it's possible!
You need to use map styling, as described in this official documentation.
With style options you can customize the presentation of the standard Google map styles, changing the visual display of features like roads, parks, businesses, and other points of interest. This means that you can emphasize particular components of the map or make the map complement the style of your app.
(...)
To style your map, call GoogleMap.setMapStyle() passing a MapStyleOptions object that contains your style declarations in JSON format.
You can use the Maps Platform Styling Wizard as a quick way to generate a JSON styling object.

How can i use the following hyperlink in Google Maps, but have it show the road labels as well?

I am using the following hyperlink to display a set of coordinates in Google Maps. It is working great. However, is there a way to have it display the road labels as well?
I do realize that if i change it to hybrid instead of earth, (by changing the "e" to an "h") it will, but our customers are liking the earth view.
http://maps.google.com/maps?f=q&hl=en&geocode=&q=36.070690,-95.807090%28LineStat%29&t=e
Thank you very much
If you link to -
http://maps.google.com/maps?f=q&hl=en&geocode=&q=36.070690,-5.807090%28LineStat%29&lci=transit
You get the option to switch to earth mode - and when you do the road labels are present...
AFAIK there is no way to enter the earth view with the road layer toggled.
You can see a pretty good list of the available parameters here.
http://mapki.com/wiki/Google_Map_Parameters

Google maps api: Customising the MapTypeControl for separate map overlays

I have lots of slices of (non-geographical) data that I'm trying to
view via google maps. It basically breaks down into N 'maps', each
containing M 'layers'.
This sample shows basically what I want to do:
http://code.google.com/apis/maps/documentation/javascript/examples/map-simple.html
I can get it to switch between two different maps by providing two
custom MapTypes (much like the Map/Sattelite toggle in the sample),
but I can't figure out how to make it so I can toggle on and off an
additional overlay layer (like the 'terrain' checkbox).
The official docs vaguely mention this (
http://code.google.com/apis/maps/documentation/javascript/maptypes.html#MapTypeInterface
) but unfortunately the bit I'm after ('See Adding MapType Controls
below') is a dead link, and I can't find this bit of the
documentation.
Does anyone know where the documentation on how to control the drop-
down toggle boxes exists?
Thanks
If you are looking to have a particular overlay appear or disappear based on a checkbox, you can check out http://geojason.info/2010/overlay-map-management-with-google-maps-api-v3/.
However, that involves checkboxes that are not actually on the map. They need to go in a sidebar or above the map or whatever. If you are hoping to be able to add things to the control where the "terrain" and the "layer" checkbox appear, I don't think there's any hooks in Google Maps API v3 to do that. I'd be happy to be wrong, but I don't think it's simple and I would expect any solution that managed to accomplish it would be brittle.