How can i set size of openInfoWindowHtml in google Map - asp.net

Please help me to change size of openInfoWindowHtml in google map and plez tell me can i make it popup out of map area also..? i mean my map area is very small but i want that when user click on Marker this openInfoWindowHtml should show popup and if its crossing size of map than its should show beyond the boundary of google map. ( i am working in asp.net)

There are 2 ways that you can influence the size of the InfoWindow. First, you can pass a GInfoWindowOptions object when you call openInfoWindowHtml (see: http://code.google.com/apis/maps/documentation/reference.html#GInfoWindowOptions) Second, you can wrap the contents of the InfoWindow in a div and use CSS to set the size of that div.
Regardless of which method you use to set the size of the InfoWindow, it can never exceed the bounds of the map canvas (area).

Related

Add marker/dot on image at accurate pixel with zoom in/out functionality

I'am using reactJS and want to design a component with following functionality :
Display pixelated image which is able to zoom in and zoom out at pixel level.
When clicked on image , display a marker- which can be a dot or icon at specific position.
When image is zoomIn/zoomOut, marker size and position should not change.
Even after zoomIn/zoomOut when clicked on image, marker should get repositioned at proper pixel on the image.
I am thinking of applying same logic as used in the maps/ leaflet. Like they maintain separate layers for map and markers on the map. If we zoomIn/out maps it won't affect the marker position or size, same functionality I want for the image.
Anyone with the solution or related library will be welcomed !
(For reference, I want this design for marking GCP(Ground Control Points) on the image, which requires very precise marking at pixel level)

Qt: Add margins to the visibleRegion of a Map

I have a Map that fills the window and some locations from which I generate a georectangle. I want to set the visibleRegion of the Map to the georectangle but I also want a margin (in pixels) a the bottom of the window for overlays, so that the locations are never hidden behind the overlays. How can I do this?

How to set a LocationRectangle on Universal Windows Platform map control?

I am developing an app in which I have a Map control! On this map, I am adding custom pushpins via map.Children property. How can I set a LocationRectangle and then zoom on it? Because I want my pushpins not to be out of the screen size. I want the map to zoom on a level in which all of the pins will be on the screen!
You can use the MapControl's TrySetViewBoundsAsync method. This method allows you to specify a bounding box of the area you want to display (which you can calculate by finding the the farthest pushpins in all directions, which will give you the north-west and south-east corner of the area), a potential margin and a map animation to use while the view is being changed.
You can find more details about the method in the documentation.

Change the color of Zoom control Google map 3

i'm looking for some info about Google Map V3. I want change the color of the zoom control , i want it red...
How can i change the color simply ?
Thank you for response !
They're images, so you can't simply "change" the color. What you can do, however, is create a map WITHOUT the zoom controls and then just use the API and your own DOM elements as zoom controls.
This will give you a very rough idea:
var map = new google.maps.Map();
//zoom out
map.setZoom(map.getZoom()-1);
//zoom in
map.setZoom(map.getZoom()+1);

Calculate number of markers in visible area of Google Maps

I have, for example, 10 markers on Google Map. But I zoomed and in visible area left only 2 markers.
Can Google Maps API somehow return me a number of markers in visible area (2 for my example)?
You can evaluate map.getBounds().contains(marker.getPosition()) with each marker to see which ones are included in the current viewport.
The above code is not working. There is no method as such getBounds(). Below is the updated code :
VisibleRegion visibleRegion = map.getProjection().getVisibleRegion();
LatLngBounds mapBound = visibleRegion.latLngBounds;
if(mapBound.contains(marker.getPosition()){
// do somethings i.e. such as changing marker icon and others.
}

Resources