Is it possible to increase map image resolution? - here-api

Here is what my HERE map image looks like:
satellite image
As you can see from the image above, the resolution is not very good. Is it possible to get better resolution?
Here is the http request that I used: (note: you will have to enter your own api key for this request to work correctly)
https://image.maps.ls.hereapi.com/mia/1.6/mapview?apiKey={API_KEY}&ppi=500&sb=km&w=600&h=600&t=3&z=19&c=42.060059,-91.631646

The ppi attribute in the request will allow the ability to change the resolution but if you're looking to get a clearer satellite picture than that will not be possible.

Related

Is it possible to specify the SIZE of image requests from https://firebasestorage.googleapis.com/?

When utilising Firebase Storage to store imagery, for example, user avatars, is there a way that you can request a smaller, thumbnail sized serving of the image?
I have searched Google and documentation and I have been unable to come up with a result. Currently my app utilising Firebase Storage URLs experiences a minor delay prior to loading images due to the fact that it I am requesting large images to fill tiny avatars.
Is there a resource I am overlooking that specifies the available parameters for this URL? (of which token & alt are two I'm aware of).
Thank you for the assistance in advance.
Auto-resizing images upon read is not a feature of Firebase Storage. The typical solution is to create variants of the images during upload, for example through the Resize Images extension.

How to get a Google profile image with specific resolution on Android

There seems to be no direct way to query a users google profile image with a specific resolution on Android. The documented approach is here: https://developers.google.com/identity/sign-in/android/people
That approach provides an image URL which is of a low resolution (using: GoogleSignInAccount's getPhotoUrl() method).
The corresponding approach on iOS does have a way to get the profile image by specifying a resolution as mentioned here:https://developers.google.com/identity/sign-in/ios/api/interface_g_i_d_profile_data#a8e229bffe211894473058c4ba247553c
The workaround suggested in one of the stackoverflow posts is to do a string replacement in the retrieved URL to get a larger image. Link: Photo size in getPhotoUrl() method Google Identity toolkit
Is there a better way to get a higher resolution google profile image on Android for Google Sign-in?

getTile() returns nothing in native map types, how to get back functionality?

On an early version of the maps 3 api, I build some "overlay" functionality to do the following using a custom map type - the idea was that as opposed to always serving my tiles on top of google's tiles, I would only show google's tiles when needed - that is either when the tile is outside of my zoom and boundaries or when my tile has transparency (mostly due to the fact that the outside borders of my overlays may follow rivers, etc). It worked like so:
When getTile was called on my type, determine if I should be serving the given tile for the given level.
If I should be serving the tile, determine if the tile had any transparency - if it did, get the tile from the default map using
map.mapTypes.get(google.maps.MapTypeId.ROADMAP).getTile(coord, zoom, ownerDocument)`
then append my image to the top of the returned div and display that. Otherwise, just serve my tile.
If I should not be serving, the tile, just return
map.mapTypes.get(google.maps.MapTypeId.ROADMAP).getTile(coord, zoom, ownerDocument)
So, it seems like due to some thievery, getTile no longer returns anything on google's native map types, which bring up two questions:
Is there any way for me to tell the map that it should be displaying my tile as an overlay as opposed to a full tile without having to have my whole map be an overlay?
Is there any way to tell the map that it should be displaying its own tile as opposed to mine?
The overlay maps work as a solution, but performance is not great, there are quite a few redraws as google first draws its own tiles and then overlays them with mine. Since 99% of my tiles are a complete overlay (no transparency) this seems like quite a waste of bandwidth. It would be great to be able to pass back metadata from getTile indicating whether the default google tile should be drawn at all (or indicate that fact in some other callback). What I had previously seemed like an elegant solution and performed well - the overlay methodology is definitely a step back. Marcelo, I'm not sure how my title does not reflect my question... did you read the complete text of the issue?
You can't access the base map types. It's been intentionally disabled by Google due to ongoing abuse.
At some point this was reported as a bug, but you can read the comments by members of the maps team on this thread:
Quote from that page:
Unfortunately we discovered an increasing number of cases of developrs
using the default map types to gain access to and use Google map tiles
outside of a google.maps.Map object, which is not permitted by the
Terms of Service. We were therefore forced to move the internal map
types to a private registry. If you have specific reasons for needing
access to the map types that are compliant with the Terms of Service,
please update this issue with your use case, and if there is
sufficient demand we will look into whether we can provide a
supportable solution for your requirements.
by Thor Mitchell (Google Employee - Maps Team)

How does milliondollarhomepage work?

I noticed the pixel array is only one image, I wonder if it is dynamically created on a page request and then cached? Is that possible to do with .NET?
I wouldn't be supprised if the entire page was completely static. It looks like nothing more than an image with an Area Map over the top of it, the query string just changes the image from the previous cached one, probably incremented when he was selling pixels.
http://milliondollarhomepage.com/img-pix/image-map.png?r=476
There's no reason why you can't dynamically generate the image server-side and cache it. So yes it's possible.
It's a single giant image with an image map
You can see this by viewing the source.
Also, being that the image has a querystring parameter, I'm assuming that the image generation and map generation is all being done server side.
src="img-pix/image-map.png?r=323"
And "YES" this is possible to do entirely in .NET

Why does Google Analytic request a GIF file?

Why does Google Analytic request a GIF file?
Is it because the GIF allows access to more data than JavaScript alone. Is it to get the IP address of the user?
Google's javascript has to transmit the details of your page view to their servers some how. Ajax cannot be used across domains, so the only way to submit the information is to request a file from a Google server, passing the necessary information in the query string. To facilitate this, some form of content must be requested using a standard HTML tag. The easiest way to do this without impacting the page itself is to load a 1x1 transparent gif. Note that in the case of the Google script (and others), this image isn't actually added to the page. It's merely loaded via a javascript statement
var img1 = new Image();
img1.src = 'http://path/to/file.gif?otherinfohere';
This loads the image without adding it to the page. The information could also be loaded using a script tag like so:
<script src="http://path/to/script.js?otherinfohere" type="text/javascript"><script>
However, users are more likely to have javascript blocked than images, so the safer route is to request an image. As to why they would use a gif instead of say, a jpg, a gif is safer in case a rogue browser actually adds the image to the page. The transparent gif is unlikely to negatively impact the layout, where as a 1x1 jpg would leave a 1 pixel dot somewhere on the page.
Edit: To add to my comment about users having blocked javascript, a gif request containing static information can be added inside a noscript tag to allow basic tracking even in the event that javascript is disabled. To my knowledge, GA doesn't do this, but some other web analytics providers do.
Even with JavaScript enabled, analytics requests a GIF file. If you look at the GET params of the image, it contains a lot of information about the browser. Stuff like utmsr=1280x1024 (the screen size). Google Code has a list of parameters.
It uses the image request to send information about the browser without an XMLHttpRequest.
Now, to actually answer the original question, Google is probably doing this to get around cross-domain XMLHttpRequest restrictions.
http://www.perlmonks.org/?node_id=7974
The smallest transparent GIF is 43 bytes.
http://garethrees.org/2007/11/14/pngcrush/
The smallest transparent PNG-24 (which can't be shown by older browsers too) is 67 bytes.
http://www.techsupportteam.org/forum/digital-imaging-photography/1892-worlds-smallest-valid-jpeg.html
The smallest (opaque) JPEG is 134 bytes.
The math is simple! Bigger size = more costs.
you can use the __utm.gif tracker without javascript (w some server help)
you can use it in an email message (w some programmatic help before sending the email)
Urchin was developed before AJAX was popular (2005)
It has nothing to do w cross-domain. They could have used JSONP for that.

Resources