android googlemap export to share - google-maps

I have an app with a google map fragment. I have added some markers and polygons, all within a 1km square.
Ultimately I would like to export the map to a pdf using code. Im guessing the first step would be to create a kml file with my objects.
Does anyone have any pointers?
Thanks

You can take bitmap of the map by calling map.snapshot(...)
https://developers.google.com/android/reference/com/google/android/gms/maps/GoogleMap.html#snapshot(com.google.android.gms.maps.GoogleMap.SnapshotReadyCallback)
After this you can make with bitmap what you want, export to pdf with some library and share, for example.

Related

How to create Google Static Map with polyline data

How can we create a google static map with a custom polyline overlay?
I need to create a map image, which has to be embedded into a pdf report. The basemap will be google, and on top of that, we need to show the markers and polylines.
I could see some docs to include marker while creating google static maps. but couldn't figure out a solution for including custom polyline on that. I've the polyline data in my database as geojson and can change it to any other defined format if required, from a nodejs api.
Could anyone suggest a solution for this?
Thanks in advance

Custom Google Map (with markers) + Custom .json embed to website

Been trying to get my head around this for some time although clearly i'm missing something
what i am trying to do is not draw a new map although provide a src link to say (https://www.google.com/maps/d/u/0/embed?mid=1xI_dALvs0A-oySG-dkf4BYeDyBk) to something of the below
https://developers.google.com/maps/documentation/javascript/styling
I want to embed my custom map with the markers to my site and styling it
I guess map = new google.maps.Map(document.getElementById('map') has something to do with the drawing of the new map although not too sure as to take it out or what.
is there anyway to use the custom map + .json code rather than hard coding an array of poi's as would like to rely on it pointing through to the custom map link for the markers
is there any better way to get around this
Google Maps JavaScript API can load data that were stored in GeoJSON format. So you have to look into GeoJSON specification and create corresponding file for your markers (or polylines, polygons, etc.).
The Google Maps JavaScript API documentation explains how to load the GeoJSON data via Data layer of maps:
https://developers.google.com/maps/documentation/javascript/datalayer#load_geojson
You should combine the styling example with GeoJSON example from the documentation to achieve your goal.
Here is the github link - https://github.com/hpi1hpi/custom-google-map-with-json
Add google map with custom color and data from JSON with slider

Adding 3D model KMZ with Google Maps API: is it possible?

I'm wondering if it's possible to add a 3D model made in Sketchup, exported o KMZ format, to a Google Map, with the Google Maps API. I was able to add KMZ layers that contained simple data as landmarks and such, but when I try to load the 3D model KMZ, the map just shows a default house file icon.
The test map can be accessed here: http://thebob.com.br/maptest/kmz_test.html
The KMZ file is hosted here: https://sites.google.com/site/dmgckmlfiles/kml-files/Bulk_carrier_1509.kmz
At this point I'm just guessing it's not possible to add 3D models like this into Google Maps (as the exact same thing happens if I import the file through My Maps), but I want to make sure of that before giving up.
Thanks in advance for any info!
Well if you are pertaining in Google JavaScript API, Yes this API does support the KMZ as you can see in this link about Supported KML elements. But the 3D object is not.
Also, according to this SO question, that 3D is not yet features in Javascript API. Closest things to this are Styled Maps. Only the Android implementations are available as of now.
But I found this tutorial that can help you if you still want 3D objects.

Create tiles given images and locations; convert markers to tiles

I've developed a HTML application that displays a map. This map has many fixed markers (they do not change in time).
Due to that:
I want to speed up the application
I want to hide the marker position from malicious users (so they can't use the information I've gathered for they're own porpose)
I want to convert the markers to a tile layer.
I've been googleing without success how to do this. Anyone has faced this problem and has a nice easy solution?
Thanks!
If the markers never change, there is a great solution:
Mapbox.
You can create your map with the markers, then the mapbox servors will send the tiles with the markers.
You can use a quadkey. It'similar to a quadtree. You can download my PHP class hilbert-curve # phpclasses.org. It also uses a quadkey.

Google Maps - Online Map Marker to mark polygons and shapes onto the map

I'm looking looking for a tool that will allow me to make a map exactly like this:
http://datasearch.uts.edu.au/about/mapsdirections/map.cfm
Basically I need to put shapes around buildings in the satellite view and then slap a marker and information window on them so that I can specify the building name and contents.
So the main issue is that I need the ability to draw shapes directly onto the maps as I don't fancy taking down the lat lng of each corner of the polygon.
Ideally what I'd like to do is have an online application that exports those points to KML, and then I would display google maps on my site and import that kml to display it.
Other suggestions welcome!
Jason
Found a polygon creator
http://www.the-di-lab.com/polygon/
It's simple to use and allows you to copy and paste straight into your code. Would be nice if it had a button that said sent to kml though..