Topic: Custom Google Maps Styling

Hi there,

first off, thanks for this great product! It helps me a ton as it is right now!

My questions:
1. Can I change the style for my Google Maps Tiles?
I was thinking of editing the request thats sent to google with something along the lines of this:
https://snazzymaps.com/style/69036/oakv … rio-kanada

However I couldn't locate the section sending the request to the google servers in your code. But maybe there is a simple way in your API to change the styling?

2. Is it possible to create a 3D Google Map Tile version? I mean with the streets as 3D elements?

3. Where do I set my Google Maps API Key, or don't I need to set one to use this service in production?

Thank you!

Re: Custom Google Maps Styling

Hello.

1. Provider - Custom.
URL:
https://maps.googleapis.com/maps/vt?pb= … djpvbg!4e0

2. Unfortunately, I did not understand this question.
Please rephrase it in detail.

3. Google API Key is not used in the url of tiles.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Custom Google Maps Styling

Thank you for your fast and great support!

Elaborating on Question 2:
I would like to get the roads as a separate layer to make a 3d mesh out of it. Like 3D roads, buildings etc.

I think this post (http://barankahyaoglu.com/dev/openstreetmap-in-unity3d/) explains it rather good and already gives some hints on how to do it, I would love to see this integrated in your product.

Post's attachments

Attachment icon %2F2014%2F12%2Fbahce.jpg 164.15 kb, 96 downloads since 2016-07-21 

Re: Custom Google Maps Styling

Hello.

I read it, and that's what I think about this:
1. Online Maps supports Open Street Map Overpass API, which is much more powerful that mapzen. You can get all this data from Overpass API.

2. Mapzen does not support XML (only JSON).
JSON added in Unity v5.3.
Online Maps supports Unity v4.3+.
Yes, some users still use Unity 4.X.

3. Do it in Unity will be very slow. Unity just is not suitable for this purpose.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Custom Google Maps Styling

Alex Vertax wrote:

Hello.

1. Provider - Custom.
URL:
https://maps.googleapis.com/maps/vt?pb= … djpvbg!4e0

2. Unfortunately, I did not understand this question.
Please rephrase it in detail.

3. Google API Key is not used in the url of tiles.

Hey, Alex.
Could you tell me how to get the URL you mentioned for that map style?

Re: Custom Google Maps Styling

Hello.

Step by step instructions (from the documentation, section - Styled Google Maps):
1. Configure the desired style map using any online service that allows you to customize the style of the map.
For Example: https://snazzymaps.com/
2. Open the browser developer tools. Hotkey in most browsers - F12.
3. Find an address request to download any tile.
It will look like: http://mt0.googleapis.com/vt?pb=!1m4!1m3...
4. Open this URL and make sure that the image has a size of 256x256.
5. Copy this address.
6. In Online Maps Inspector select «Provider - Custom», and paste the address in «URL».
7. In the «URL» replace «!1iX!2iX!3iX», to «! 1i{zoom}!2i{x}!3i{y}».
It should look something like this: http://mt0.googleapis.com/vt?pb=!1m4!1m … y}!2m3!...
8. Make sure URL ends at «!4e0» (inclusive). If you have characters after this, delete them.
That's all. You are using Styled Google Maps.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Custom Google Maps Styling

Thank you very much for your fast reply, Alex. It worked! :-)

Re: Custom Google Maps Styling

https://maps.googleapis.com/maps/vt?pb=!1m5!1m4!1i15!2i5199!3i11524!4i256!2m3!1e0!2sm!3i368045027!3m14!2sen-US!3sUS!5e18!12m1!1e47!12m3!1e37!2m1!1ssmartmaps!12m4!1e26!2m2!1sstyles!2zcC52Om9uLHMuZTpnfHAudjpvbixzLmU6bHxwLnY6b2ZmLHMuZTpsLnQuZnxwLnM6MzZ8cC5jOiNmZjAwMDAwMHxwLmw6NDAscy5lOmwudC5zfHAudjpvbnxwLmM6I2ZmMDAwMDAwfHAubDoxNixzLmU6bC5pfHAudjpvZmYscy50OjF8cC52Om9mZixzLnQ6MXxzLmU6Z3xwLnY6b2ZmLHMudDoxfHMuZTpnLmZ8cC5jOiNmZjAwMDAwMHxwLmw6MjB8cC52Om9mZixzLnQ6MXxzLmU6Zy5zfHAuYzojZmYwMDAwMDB8cC5sOjE3fHAudzoxLjIscy50OjIwfHAudjpvZmYscy50OjIwfHMuZTpnfHAudjpvZmYscy50OjIxfHAudjpvZmYscy50OjIxfHMuZTpnfHAudjpvZmYscy50OjV8cC52Om9mZixzLnQ6NXxzLmU6Z3xwLmM6I2ZmMjUzYzMyfHAubDoyMHxwLnY6b24scy50OjV8cy5lOmx8cC52Om9mZixzLnQ6ODF8cC52Om9mZixzLnQ6ODF8cy5lOmd8cC52Om9mZixzLnQ6MnxwLnY6b2ZmLHMudDoyfHMuZTpnfHAuYzojZmYwMDAwMDB8cC5sOjIxLHMudDoyfHMuZTpsfHAudjpvZmYscy50OjN8cC52Om9uLHMudDozfHMuZTpnfHAudjpvbnxwLmM6I2ZmYjgxOTE5fHAuczotNDR8cC5sOi0zMixzLnQ6M3xzLmU6Zy5zfHAuYzojZmY2YjU2NTYscy50OjN8cy5lOmx8cC52Om9mZixzLnQ6NDl8cC52Om9uLHMudDo0OXxzLmU6Zy5mfHAuYzojZmYwMDAwMDB8cC5sOjE3LHMudDo0OXxzLmU6Zy5zfHAuYzojZmYwMDAwMDB8cC5sOjI5fHAudzowLjIscy50OjQ5fHMuZTpsfHAudjpvZmYscy50OjUwfHMuZTpnfHAuYzojZmYwMDAwMDB8cC5sOjE4LHMudDo1MXxwLnY6b24scy50OjUxfHMuZTpnfHAuYzojZmYwMDAwMDB8cC5sOjE2LHMudDo1MXxzLmU6bHxwLnY6b2ZmLHMudDo0fHAudjpvZmYscy50OjR8cy5lOmd8cC5jOiNmZjAwMDAwMHxwLmw6MTkscy50OjZ8cy5lOmd8cC5jOiNmZjBmMTkyZXxwLmw6MTd8cC52Om9u!4e0!5m1!5f2&token=27244" draggable="false" alt="" style="width: 256px; height: 256px; user-select: none; border: 0px; padding: 0px; margin: 0px; max-width: none;">


still having problems changging over the url correctly.

Re: Custom Google Maps Styling

Hello.

Remove all characters after «!4e0».

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Custom Google Maps Styling

Hi,
I am new to this and I am using your plugin in one of my project. I have used the Custom URL to show stylized google map.

You said "Google API Key is not used in the url of tiles.". I have only used stylized google map and I haven't used any other services like: Google Direction API,Google Elevation API,Google Geocode API,Google Places API,Google Place Details API,Google Places Autocomplete API.
I heard that google map has limit on requests per day.
Now my questions, Is there any limit of using the url of tiles? do I need to subscribe to any Google Maps APIs plans (Standard or Premium)?

Thanks a lot for the awesome plugin big_smile
waiting for your response.

Thanks,
Hasan

Re: Custom Google Maps Styling

Hello.

Yes, Google has a limit on the number of requests.
But, in this case, this limitation personal for each user.
Theoretically Google can block the user with a large number of requests.

The best way to prevent this is use the caching of tiles.
For Online Maps v2.4 you need to implement your own caching of tiles.
Example:
http://infinity-code.com/atlas/online-m … ample.html

Online Maps v2.5 has a built-in cache system (memory + file system), which reduce the number of requests in a few times and increase the speed of application.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Custom Google Maps Styling

so From Online Maps v2.5, it does not need to add "CacheTilesExample.cs" to map gameobject?

Re: Custom Google Maps Styling

Hello.

As you wish.
Online Maps v2.5 has built-in caching system, which works well in most cases.
If you need some specific cache, which is not implemented in Online Maps, you can implement it yourself by using this example.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.