Google Maps with night view? - google-maps

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.

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

World vectorial map including states and cities map

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

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.

Google map simple map

I need to put a map on a website but the clients doesn't want anything but a simple outline of the United States. I used google maps styling wizard but still wasn't able to get just the outline. The reason I want to use google maps is I need to dynamically place markers using the latitude and longitude coordinates.
Thanks
Pretty sure you can't do this with Google Maps. You may have better luck with Leaflet:
Leaflet is a modern, lightweight open-source JavaScript library for interactive maps for desktop and mobile web browsers, developed by CloudMade to form the core of its next generation JavaScript API. Weighting just about 21kb of gzipped JS code, it still has all the features you will ever need for you web mapping needs while providing a fast, smooth, pleasant user experience.
http://leaflet.cloudmade.com/
Just use a single map image with the outline you want. If you need to generate the image yourself and really customize the map, you'll want to combine Leaflet with a few tiles generated with Mapnik, OpenStreetMap data (not the whole-world dataset probably), and possssibly TileCache.
http://tilecache.org/
http://mapnik.org/
http://planet.openstreetmap.org/

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.