jquery goMap plugin and google maps api V3 fitBounds to a country - google-maps

I am using goMap jQuery plugin for integrating Google Maps api v3. I have some external controls overlapped on the map - list of countries and I would like to fit bounds off a map to a clicked country.
goMap has fitBounds function but it only fits to the bounds of markers on the map. I found another question and answer regarding how to fit bounds of a map to a country with Google maps api v2 and v3 here, but I don't know how to combine this with goMap plugin.

I haven't used goMap, but it appears you can access the Google Maps API Map object with $.goMap.map. You can then use the Google API fitBounds (or whatever) function directly. Again, I'm not sure one way or the other if there would be any bad side-effects related to the state of the goMap object.

Related

Creating Polygon using Google Map API

I am referring the URL : https://housing.com/in/buy/search?f=eyJiYXNlIjpbeyJ0eXBlIjoiUE9MWSIsInV1aWQiOiJmMGZhNTIwNjI0ZjNhOGRlOWY4NSIsImxhYmVsIjoiUGltcGxlIFNhdWRhZ2FyIn1dLCJ2IjoyLCJzIjoiZCJ9
I am trying to make something similar, can anybody suggest how can I achieve it. I tried to search and explore google map APIs, but could not understand which API in particular can be used.
Try to read the Google Maps Showcase. Millions of apps and sites are using Google Maps APIs. Browse the showcase to see some of our favorite implementations.
You can use the MarkerClusterer library in combination with the Google Maps JavaScript API to combine markers of close proximity into clusters, and simplify the display of markers on the map.
Here's a sample project for MarkerCluster: https://github.com/googlemaps/v3-utility-library/tree/master/markerclusterer
Polygon is one feature of Drawing tools of Google Maps. The DrawingManager class provides a graphical interface for users to draw polygons, rectangles, polylines, circles, and markers on the map.
The Drawing Tools are a self-contained library, separate from the main Maps API JavaScript code. To use the functionality contained within this library, you must first load it using the libraries parameter in the Maps API bootstrap URL:
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=drawing">
</script>
Once you’ve added the libraries parameter, you can create a DrawingManager object as follows:
var drawingManager = new google.maps.drawing.DrawingManager();
drawingManager.setMap(map);
Reference: https://developers.google.com/maps/documentation/javascript/examples/drawing-tools

Set camera in Google Maps 3D view using JavaScript

I have recorded flight track data (lat, lon, altitude, angle, speed...) and want to simulate a cockpit view of the recorded flight.
Is there a JavaScript API to do this in 3D Google Maps (set and move camera view in Google Maps 3D)?
I am new to Google Maps API and cannot find documentation for this.
I think you can't do it using Javascript API. But closest thing for this is by using Styled Maps. As of now only Google Maps Android API and Google Maps SDK for iOS
can do it.
I found the very cool framework cesiumjs
which provides excatly what i was searching for.
Set camera with heading, roll, pitch and altitude.

Google Maps Places API, need to get same markers as on Google emded

Good day !
I'm developing custom service, that will grab params form Google Maps url, like https://www.google.nl/maps/search/fietsenmaker/#52.1285737,5.0837216,13z/data=!3m1!4b1?hl=en. From this example it's possible to take search param, longitude, latitude and zoom level. All this params will pass to Google Places API and markers will be drawn on Google map. The main problem, i can't get this markers look same as on embed Google Maps. Here is attachment:
In simple words:
Need to dynamically embed map with listing of places, that was originally in search param and place map center according lat/long with original markers as on embed map.
Any ideas ?
Thanks !
Google Embed API will allow you to embed maps with starting params, like map center, object name. You can find it here https://developers.google.com/maps/documentation/embed/guide
Good luck everybody !

How to load new google maps with API v3

Classic My Maps on maps.google.com will no longer be available.
Now we must use new maps. I would like to embed them to the website, without iframe that google suggests.
Before this change I used simple kml layer:
var kmlLayer = new google.maps.KmlLayer('https://maps.google.com/maps/ms?ie=UTF8&t=m&authuser=0&msa=0&output=kml&msid=212840568890456843825.0004c1fba0c8371a81c2b');";
kmlLayer.setMap(gMap);
But during the automatic update of my maps it was broken, if I use the same link - I got empty icons. Here is the new map (converted by google), can I load it using API V3 as I did before?
https://www.google.com/maps/d/viewer?mid=zhJ_pzBRPGN8.kCI6hT4Kq0Ao
In other words:
I want to create maps here: https://www.google.com/maps/d/
And to embed them using API v3, but where can I get a link to the layer? Central coordinate, zoom level?
Change the KML Layer link to:
https://mapsengine.google.com/map/kml?mid=zhJ_pzBRPGN8.kCI6hT4Kq0Ao&lid=zhJ_pzBRPGN8.kZ0hfyeW-GtI
I grabbed this link from the "Share", "Download KML" URL on the Map that you linked to.

Place markers through search in Google maps API (static)

I am currently working with the Google Maps API and returning static maps (images) from the API.
I need to place markers on the map. The documentation says how to place markers on the map by defining long/lat values: http://code.google.com/apis/maps/documentation/staticmaps/#Markers
My problem is that i don´t know where to place the markers. I want a google maps search phrase to determine the placement of the markers. Is that possible?
To sum up:
I want to submit a search phrase to the API and have a static map (image) returned with markers matching my search phrase.
You can place markers based on an address:
http://maps.google.com/maps/api/staticmap?center=55.665149742004,12.5627200816055&zoom=12&size=640x640&sensor=false&maptype=hybrid&markers=color:blue|label:S|smallegade%201,%20frederiksberg
Yes, it's possible. Try this:
http://code.google.com/intl/pl/apis/maps/documentation/geocoding/
This particular link regards to Maps API Web Services, but there are others api, for javascript for instance.
Generaly you need Geocoging that tranlate address to latitude and longitude
I believe you can not search a term in Maps Static version. It is not in the accepted parameters: https://developers.google.com/maps/documentation/maps-static/dev-guide#Usage
Try using Embed or JavaScript versions instead.