I´m using Openlayers and layer Google Satellite and I´m trying to turn off the bird´s view. I found this advice:
It looks like you will have to poke at the underlying GMap object
directly - something like this should do it I think:
layer.mapObject.setTilt(0) The weird thing is that my reading of the
Google docs says that you have to explicitly turn it on if you want
it, and OpenLayers isn't doing that, but still seems to get it.
The problem is that I´ve just started with Openlayers and javaScript. Could someone please show me this directly in the code? Mine is:
var gsat = new OpenLayers.Layer.Google(
"Google Satellite",
{type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22});
map.addLayer(gsat);
well, this seems to be working: fiddle it boils down to line of ghyb.mapObject.setTilt(0);
Related
I'm trying to make a google form look like my own site. I found examples of how to do this on How to style Google Forms and google-custom-form (GitHub project), but I tried both of the examples they give and they seem to fail now.
I had a look at Class Form - Google Apps Script which seems to be like an API, but I can't get my head around the documentation. Does anyone have an example of it working. Or has found another way of getting this to work? It would be really handy to do as embedded forms look really out of sync with the rest of the site.
The API you're linking to is an apps script API. This is needed if you want to create dynamic forms (dynamic amount of questions, dynamic answers,...) but not for custom styling. An intro to appscript can be found on this page: https://developers.google.com/apps-script/
You could just create a form manually on https://www.google.com/forms/about/
You can change the styling and colors in the top-right of the page. When you are ready to embed the form on your own page you have to press "SEND", an select the embed icon <> at the top.
I've worked with this a ton, and still have issues with it. Been learning the new api v4 for sheets but still having trouble, it is still in beta too. For now I can recommend this solution though by heaversm on github.
https://github.com/heaversm/google-custom-form
The example fully works as long as you find the entry.xxxxxxx for each field and replace in the appropriate js. To avoid the embed issues, give your form submit on a click function that has the event as the input and then preventDefault on the event like so:
$('#submit-button').on('click', function(event){
event.preventDefault();
// continue code from heaversm
});
Hope this works for you. Cheers
I want to make web site like this.
http://sf.eater.com/maps/the-38-essential-san-francisco-restaurants-january-2015
I don't have any experience Google map API.
Where I can get sample code or theme like this?
Google map api is pretty simple, but you need to use some other plugins as well to make it work like this website. Although i wont be able to handover the code to you, but here is what you have to do.
You just create a map and add points to a map and then add an event on the click. Take a look at this for a simple event.
https://developers.google.com/maps/documentation/javascript/examples/event-simple
You can replace the zoom in feature with windows load method to jump to a certain anchor on a page. You can also add any smooth scrolling plugin, You can use this code.
https://css-tricks.com/snippets/jquery/smooth-scrolling/.
Now when someone clicks on the map, javascript should be redirecting you to another page but because you will be using this technique with #anchors, instead of going to another page it will try to find this anochor on the same page. And the smooth scroll plugin will animate the scrolling for a better effect.
I have a fully functioning map using the API v3 with markers placed as a result of database searches, and info windows that pop up correctly. So far, so good.
What I would like to do is to allow the user to place a marker on the map manually, i.e by dragging and dropping a placemark in exactly the same way as google "My Maps" uses to build a map or by clicking on the map.
There are several reasons for doing this, but one is that I would like the user to easily identify a centre point of interest so that I can filter searches within a radius of this point.
I would have thought that this option would be useful to others.
Maybe I am using the wrong search terms for this, and the terms "marker" and "placemark" seem to be interchangeable, which doesnt help, but I cannot formulate a search which has even shown that anyone else is trying to do this.
Have you seen this example of the drawing tools, it allows you to add Markers, Polylines and Polygons, you can customize it to just do Markers.
Here is the documentation for the Drawing Manager
I followed this guys tutorial
http://stiern.com/tutorials/adding-custom-google-maps-to-your-website/
The tutorial is on adding a custom google map to a website.
Everything works fine, as you can see http://olivegrove.com.gr/?page_id=7
I just really would like to have the directions function on the map,
as it is done on the actual google maps.
Is there a way of adding this?
Does any one a good tutorial on the internet for it?
It's not exactly the same, but it has powerful directions search capabilities; you may want to use the DirectionsServicedev-guide. If you are just starting out with Google Maps, you will also want to check out:
API-Doc
Code Samples
Utility Libraries
I'm currently creating an interactive web map using Google Maps Javascript API version 3. I'm not sure if this is possible but I would like to create a series of map layers consisting of different kml files that could be toggled from the side bar. I would also like to be able to access the individual points within the kmls so that when the user clicks on a particular point, photos, text etc. can be loaded outside the map window...
Any ideas on how to accomplish this? I've been searching for a while and only found ways of configuring the infowindow which I personally find unattractive...
There is a way to load KML into a google maps application natively, there is actually a pretty good example of how this is done here:
http://gmaps-samples-v3.googlecode.com/svn/trunk/layers/layers.html
One trick I will mention is that since the KML is downloaded to Google's servers in order to be rendered on the map, it must exist on a public facing web server somewhere, Google won't be able to access it from your local machine.
I found this tutorial which seems like it'll do the trick!