Can you advise if storyboards are supported with google maps ios sdk v 1.1. I'm getting some strange results
I have to 2 view controllers for maps. The first one displays a single map and renders absolutely fine as it pushed onto the navigationcontroller using storyboard push segue..
I have another map viewcontroller which is loading multiple markers. This view controller is also on the storyboard but loaded using a custom transition to fade in.
I am loading the views as per the sdk examples in the loadView method.
I have 3 problems with it
1.The first time the map with multiple markers is loaded the map does not get displayed/rendered. When i tap the button to display the view again (which does nothing if the view is loaded) it then renders the map and markers.
2.I close this view and load another view using the custom segue. if i go back to the map view with multiple markers i get an exception in the loadview method when it tries to assign the mapview to the view
*** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'A view can only be associated with at most one view controller at a time! View <GMSVectorMapViewBridge: 0x150376a0; frame = (0 0; 320 416); layer = <CALayer: 0x15055cd0>> is associated with <GMMapResultsViewController: 0x10faa2a0>. Clear this association before associating this view with <GMMapResultsViewController: 0xb51ad90>.
3.Lastly if i load the first map view controller with asingle marker, it loads fine, then I return to the 2nd map view controller with multiple markers. The same problem occurs when rendering the map. then if i try to select a map marker it is not handled by the delegate. Even though it would work ok if i loaded this map the first time.
I suspect if you do the following, your problem may go away...
add a UIView into the view controller where you're working
set it's type to be GMSMapView in the identity inspector.
Then control-drag it to your code as you would for any other outlet.
Once you've done this working with the Google maps becomes quite easy.
In case anyone needs a working example: Google Maps SDK 1.1.2 with Storyboards. You can find it on github: https://github.com/rendulic/GMaps3D
Related
I have built and deployed a next.js app that displays a map with the help of #react-google-maps/api . Furthermore, I'm using the Google maps "data driven" API to create a feature layer that displays postal code boundaries.
I've deployed this to Vercel and it works well on some browsers.
But, the problem I'm having is that the "feature layer" is not displayed on some browsers.
On browsers on which the "feature layer" is not displayed, the following error is being printed to the console
google.maps.FeatureLayer.style: The map is not a vector map. That will prevent use of data-driven styling.
and in full below:
key=***************&v=beta®ion=US&map_ids=81e0340ff65abdde&callback=initMap:343 google.maps.FeatureLayer.style: The map is not a vector map. That will prevent use of data-driven styling.
I've checked the status of my map on the google cloud console and my map is shown as
Name Map ID Type
Zipcode Map 81e0340ff65abdde JavaScript – Vector
The map seems to be a js vector map but still gives this error.
I don't know what else to try and there seems to be little information on this topic. Any help is greatly appreciated.
What are the actions that can be described as requests when the map in my website is used by a visitor? For example: if the user is zooming in or out, is this a request on the map?
Thank you
As the documentation states:
A single map load is charged when any of the following occur:
A web page or application displays a map using the Google Maps JavaScript API.
After a web page or application loads a map, a static map image, or a Street View panorama, any user interactions with it, such as panning, zooming, or switching map layers, do not generate additional map loads or affect usage limits.
Is there any way how make normal Map View in flutter. I need to have map ready when user opens the app. Only thing I saw, is that apptree plugin, but I could only make the map appear after user taps the button (and fullscreen, I need to put it into container). Basicaly what I need is some Map Widget, is there any ?
You can use some plugin like
https://github.com/apptreesoftware/flutter_google_map_view
flutter plugin for displaying google maps on iOS and Android
//Create an instance variable for the mapView
var _mapView = new MapView();
//Add a method to call to show the map.
void showMap() {
_mapView.show(new MapOptions(showUserLocation: true));
}
Unfortunately this is one of the drawbacks of choosing to render own components on GPU instead of using OEM solutions, they need to bake GMaps renderer over Flutter APIs and probably will, in the meanwhile, try this implementation: https://github.com/apptreesoftware/flutter_map
I am using the Google Maps Control for ASP.Net. I am adding one point which is current point of bus & polyline of the points from current point to last 10 points on the page load with showing popup on current point by default.
I am using update panel for the the refresh button. There is also one input field which takes number of record to show on polyline from current point. Now I want to reset my googlemapObject on refresh button click event so that in every refresh click completely new set of points, polylines should add and shown on google map.
Is there is any method like dispose to dispose current object of goolemap.
How to resolve this problem?
Regards,
Girish
I'm assuming that you are using the Google Maps Control for ASP.NET found at:
http://en.googlemaps.subgurim.net/
If that is the case - there is an example found on their site that will walk you through how to erase icons that are added to the map.
The sample code can be found right here:
http://en.googlemaps.subgurim.net/ejemplos/ejemplo_99000_Custom-Javascript.aspx
By implementing a custom Javascript Event you will be able to change the data on your map with the refresh button - without needing to do a whole page refresh.
I am creating a custom map into MyMap link on google map for creating our own map with adding various placemark points &/or lines.
see http://maps.google.com/maps/ms?ie=UTF&msa=0&msid=
113225627012396411583.000478b8658fde4ac307b
Can I use the url getting from crated map into our application to show it programmatically with adding some points through application with javascript instead of using following url:
http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAcl
Regards,
Girish
One thing you can do is go to the MyMap and grab the URL from the "View in Google Earth" link on the bar at the top of the map.
Then you can use that URL in a GGeoXml call in the Google Maps API.
Another thing you can do is go to the MyMAp and click the "Link" link on the bar at the top of the map. If you feel like it, use the "Customize and preview embedded map" option. Then grab the displayed HTML and paste it into your website.
In both those cases the data is dynamic. Future changes to the MyMap will be reflected on your website, after a few hours delay due to caching on the Google server.
If you want more control, then you'd need to consider third party extensions to the Google Maps API, such as EGeoXml, GeoXml or GeoXml3. In which case the data would normally be static and not reflect future changes to the MyMap, but you could write your own server-side code to refresh it.