Google Maps custom marker - can the iframe accept one like the static maps? - api

I was reading the static maps API, and it says you can include a custom marker in the GET params. You simply link to an image file.
I now have a second Google Map within an iframe, and was wondering if you can attach custom markers via the GET params to it? Here is the src attribute of the iframe currently.
http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=111+Fake+Street+Noosaville+Queensland+Australia&ie=UTF8&output=embed
I can't seem to find the documentation on how to do this, if possible.
Is this possible?

As far as I know you cannot add custom marker icons on maps.google.com, but you should be able to add a marker with a custom label.
You may also be interested in checking out the following reference, which describes all the known parameters that can be passed to maps.google.com:
Mapki: Google Map Parameters
While this is not an official API, I think it is fair to say that these should be quite reliable, since they are the same parameters used for the permanent links in Google Maps.
On the other hand, you may want to consider using the Google Maps API instead. You will get all the capabilities you had with the Static Maps API (and more), and it will look pretty much the same as the iframe you are using right now.

Related

Customize deepview by adding a image to it based on link data

I would like to customize my deepview with a specific image depending on where on my site it is clicked (custom product image for example).
I understand that I can not use javascript in the deepview but my thinking was that I might be able to pass a url to our cdn in the query parameters of the link but I can't figure out how to access it in the deepview.

Is it possible to customize UI of Google Custom Search's UI and the result?

Today, I found there is Google Custom Search to improve websites' search features as I'd been pretty struggling for having better results on my website search engine. However, on my website, the result page is supposed to show some images with a Javascript-rendered carousel slider.
If possible I would like to hook up the carousel slider with the results. Even though I've googled about it, what I found is just "Look and Feel" on Google Custom Search, which is a basic-level customization for fonts or colors.
Does anyone know if Google Custom Search is a editable library?
The Custom Search JSON API might be a better fit for this use case. The GCS Search Element can be styled with CSS, but trying to get the results into a carousel sounds implausible.

Svg-edit usage reference where i can find it?

I found this tool(https://code.google.com/p/svg-edit/) very useful, but there is any reference for this project allow to integrate properly in your applicatione instead of simply add it to an iframe?
For example i want to retrieve the svg code for save it in a variables or something like this
It's possible but might be a little tricky to strip out the required resources and load them in your own application while making sure that there aren't any conflicts. This is actually something I plan on doing for one of my own projects.
Do you need to do this though? You can talk to the iframe from your application pretty easily. For example, to get the SVG content you would use this (assuming you only have 1 iframe on the page) ->
var svgedit = window.frames[0];
svgedit.svgCanvas.svgCanvasToString();

Modifying photosphere on website thing

What i am trying to do is to use a photosphere on my website so that it shows up on full screen as a website cover page. The problem is the the code to embed a photosphere in a webpage given here by google
https://developers.google.com/photo-sphere/web/
lets only the photosphere size to be hardcoded as
displaysize="600,400"
what ever the values but its still hardcoded. What i want is that it gets adjusted to the screen of the user and gets displayed in the whole browser window. Any one got an idea how to pull it off? I didn't find any stuff about 'photosphere on web' other than the google link i gave above.
Indeed the API is currently designed to take static values. I think it's a good point that users might want to set the dimensions to 100% and let it resize dynamically.
I put it on the TODO list and will try to get to it shortly.
In the meantime, one work around is the following: After the viewer loads you will find an iframe on the page which contains it. You can change it's dimensions dynamically to your liking and the viewer should adapt.
The API provided by Google wraps the whole photosphere in layers of iFrames.
You can use the API to request a certain photosphere but only use the response to parse it for the values you need. Then you create your own request and the result can be shown fullscreen.
An example link is this
I created this link dynamically from the JSON response from the elements
media$group media$content 0 url
Hope it helps.
Can't you take the raw image and just use webgl to project it on the inside of a sphere?

How to pass data between pages through worklight client API

I want to invoke a procedure in one page and use it in another page, and the response is only used by the next page, so I think JsonStore is not suit for that. Should I define a global var?
Is there any code sample to do such things? Thanks for your help.
I presume by pages you mean different HTML files. If so, that is not recommended, Worklight is intended for single page applications. There are no code samples that show how to do that.
I would recommended having a single HTML page and using something like jQuery.load to inject new HTML / DOM elements. By dynamically injecting new HTML your single/main HTML file shouldn't be too big and you can destroy (i.e. remove from memory / the DOM) unused DOM elements. Searching on Google for page fragments and html templates could help you find examples. The idea is that you don't lose the JavaScript context.
Maybe you can get away with doing a new init to re-initialize JSONStore (it won't delete any the data, just give you access) on every new HTML page and use get to get access to the JSONStore collections to perform operations such as find.