Google Maps API zoom without tiling - google-maps-api-3

I'm using the Google Maps API to browse my own maps. The problem is, I only have one rather small resolution file, that I wanna display fully at level 0, which means it's not gonna get any more accurate when zooming. I still wanna be able to zoom though, by just enlarging the image. This would be useful for the markers and polygons I intend to draw on it, as they could be viewed in larger detail.
I could just create dummy tiles, that show no higher resolution than the original, but that seems like a roundabout solution that would do nothing but create more unnecessary server requests for the map files, as well as more traffic.
The problem seems to be the getTileUrl() function, as it is required. I can't think of a clever way to abuse it either, to only show different sections of the same map.
I know it already supports image enlarging, as you can observe the effect when you zoom in. The question is, if you could make that effect permanent somehow, and not make the image disappear if no new image is provided.

Suggestion:
Use the ImageMapType only to hide tiles at all(therefore let getTileUrl() simply return null)
For your own map don't use tiles, create a GroundOverlay instead.

Related

Updating Custom Interactive Map

I'm running into an issue. I'm trying to rewrite an old flash/xml map using CSS. I have a big jpg of the map, which is the background. I'm able to lay the icons out, where they need to be.
The problem I'm having is centering the whole thing on the page. Ideally, the map would be centered and the user would be able to click and drag the background image to look at the various sections, the way Google Maps or something works.
How can I do this, or what is this effect called, so I can google it more in depth. Searching "map" at all gives results about customizing Google Maps. Which isn't what I'm trying to do. I'm thinking it'll involve absolute positioning and and viewports, but I don't know exactly how to code it.
Should I just make a frame?
It looks like Leaflet will probably solve the problem. http://leafletjs.com/

How to create an interactive map in ASP.NET

I've created a page that shows a map of my complex. The idea is to put icons on the map representing where computers are located, and the user will be able to click on the icon to remote into the machine.
But I also want the icons to be moveable. Everyone should be able to open the page and drag the computer icon around. Is this possible using only ASP.NET?
you can use following options but not limited :)
Google Maps
Bing Maps
bing map sdk
You could use the html <map> and <area> tags along with an image of your complex to create a map that has points on it.
You can see an example of this here, however this is probably overkill for your requirements. All you need to do is set the coord and shape attributes for each area, this will give you an element that would represent the computers.
I'm not sure if you can manipulate these in javascript or jQuery though, as I have never tried, but hopefully this will give you a starting point.

Specific way of selecting a location on a google map

I've inherited a small project. The person before me created a native app for iPhone, implemented in objective-c, and my job is to remake it as a webapp with PhoneGap for iOS and Android.
In my predecessor's original implementation, part of the app has the functionality of allowing the user to drop a marker on a map to select a location. I found a comparable way of doing this, but the supervisor wants the exact way she'd done it, which I'm having a little trouble with. Let me describe:
In her native app, the map appears with a marker in the center of it. The user then slides the map around beneath the marker (which stays in place on the screen), until the marker is positioned over the spot they want. Then they hit a button marked "Select," and those coordinates are sent to the app for irrelevant other operations.
I'm trying to do the exact same thing with the google-maps javascript api and html/css, and I can't figure it out. Do any of you Gmaps pros have any ideas?
You may observe the center_changed-Event of the map. When it fires set the position of the marker to the new center of the map.
Another suggestion:
For a better effect instead of a marker you may use a custom control. You may insert a marker-image there so it will look like a marker. To place it in the center, push the control to
map.controls[google.maps.ControlPosition.RIGHT_CENTER]
(it will be vertically centered then) and apply the horizontal centering by adding a right-margin to the control

Adding tiles to map from multiple sources

I am working on a map for which I have multiple tiles sources that I want to be able to activate and deactivate using a menu on the side. Each tile set works independently when overlayed as an image map type, however I apparently can't show more than one of these at a time.
In any case, is it possible to display tiles from multiple tile url's? If not, then should I make some super overlay of tiles from all of my sources, and try to control which get loaded?
You can load and show as much tiles as you want to.
I can't tell you what went wrong in your approach without any code,
so I made an example: http://jsfiddle.net/doktormolle/NNJRn/
(Code for Overlay-Creation taken from the google-demo)

Masking the Google Map in iOS

In my app I have displayed some custom overlay on google map using MKOverlay with the help of TileMap sample code. My requirement is, I need to mask the entire google map underneath the overlay.That is, I want rest of the map area to appear to be in gray except my custom overlay.
Could anyone give me direction on how to achieve this?
Thanks in advance,
I don't know all the calls that you'd need to cover but I know how to find out. In the TileMap example code provided by Apple they show how the MKMapView will call for tiles. All you'd need to do is swap out the code that finds files on disk and swap in some code that always returns a grey square every time.
However this won't remove the Google logo or stop the app from downloading the map tiles from Google in the background. If you find out how to stop that please let me know.

Resources