Find marker with in the shape or outside the shape drawn by polyline on google map? - google-maps

I am drawing shape with polyline on Google map. When I get finish with drawing I click within boundary of shape which drawn on Google map and get LAtLng. I just want to find out either I click within shape drawn or outside the shape. For example if I draw the circle on map and if I click inside the circle it show me I click inside the circle or if I click outside the circle it show me I click outside the circle. I just want to get same thing with polyline shape.

Add click-listeners to the shapes, when the listener for a shape fires the click happens on the shape, when it fires for the map, it has been outside of a shape.

Related

Custom (text) overlay on google map via KML

Is it possible to draw a custom text overlay on a google map via a kml file. I'm drawing several polygons (e.g. linear ring) that separate a region into districts and I want to indicate what district the polygon is and without an marker pin.
KML does not have a native way to draw text or fonts directly on the map.
Your options include:
Add a Point/Placemark with a Label at the center of your polygon. In the IconStyle, set scale to zero, so that you only see the label.
Use a GroundOverlay image that contains the text and has a transparent background
Find a way to generate KML lines or polygons in the shape of your letters/text, and place those on the map.

How to use the polygon tool in ITK SNAP for 3D/voxel?

I know the paintbrush tool can segment out voxel 3D volume but how do I do this with the polygon tool? I want all slices to have the save segmentations.
You can accomplish that by drawing your polygon on the first slice, accepting it, scrolling to the last slice, "paste last polygon", and then using Tool menu, option Interpolate Labels. Default options should give you the desired result.
The polygon tool is used to paint closed polygons on top of the axial, sagittal and coronal slice windows.
These polygons are then filled with the currently selected label. By painting polygons slice by slice, a whole 3D structure can be selected.
Click the left mouse button somewhere on the boundary of the right caudate.
Continue clicking the left button along a sequence of points along the boundary.
Click the right mouse button to close the polygon.The green rectangle around the polygon indicates that all of the vertices are currently selected. Selected vertices can be moved by clicking and dragging the left mouse button. Let's select some vertices and move them:
Use the mouse to draw a box around some of the vertices in the polygon (to draw the box, click and hold the left mouse button near the upper left part of the slice window, drag the mouse towards the lower right corner and release the button once the box contains two or more vertices).
Click and hold the left mouse button inside the green box and drag it to move the selected vertices.
In addition to selecting vertices and moving them, you can use the buttons located under each slice window to manipulate the polygon. Use the 'delete' button to delete the currently selected vertices from the polygon. Use the 'insert' button to insert new vertices between adjacent pairs of selected vertices.
Edit the polygon by selecting, moving, deleting and inserting vertices until you are satisfied with it.
Use the 'accept' button to fill the polygon with the segmentation label 'caudates'.
Once you have clicked 'accept', the voxels inside of the polygon are assigned the currently selected segmentation label.
If you are not satisfied with your result and want to erase it, you can do so by changing the active drawing label to the 'Clear' label, and painting a polygon on top of the part of the segmentation that you want to erase. When you press 'accept', the voxels withing this polygon will be assigned the clear label.
SNAP remembers the last polygon that you used and lets you paste it. This makes segmenting a structure faster.
Move to the next slice in the slice window where you just painted (using the scroll bar or the mouse wheel).
Press the 'paste' button to recall the last accepted polygon.
Edit the pasted polygon by selecting and moving vertices, and accept it when satisfied.

Creating a "spotlight" effect using Google Maps API

I am using a DistanceWidget & RadiusWidget to create a circle of a particular radius around a center point on a Google Map. I am now looking to create a "spotlight" effect similar to how it is being done on Housing.com (example at http://bit.ly/1vkyJtY) where the outside of the circle appears to be lightly masked and the inside of the circle is in full color. I have already created the circle and distance puller, I'm just trying to figure out how to go about creating the spotlight effect.

How to disable polyline click on overlays?

I've dispatched mouse over events on polylines. This event is fired even when I mouse over on an overlay which is on the polyline. How can I avoid it so the overlay actually hides the polyline under it?
The simplest approach is probably just to set the Polyline's clickable property to false when you add the other overlay (which I'm assuming is a custom overlay). Then, the Polyline won't respond to mouse events at all, if that is your goal. For that, you simply pass a PolylineOptions object to the Polyline constructor, or call the Polyline.setOptions function and pass a PolylineOptions object, if you want to make the change dynamically after construction.
If you want something with more fine-grained aspects, such as taking full control of the stacking order of overlays, you will want to look into the MapPanes. There are seven panes, which are essentially layers where overlays may be added to the map. From bottom to top, they stack in this order:
MapPanes.mapPane
MapPanes.overlayLayer
MapPanes.overlayShadow
MapPanes.overlayImage
MapPanes.floatShadow
MapPanes.overlayMouseTarget
MapPanes.floatPane
Since you are trying to cloak even the mouse events of the Polyline, you will probably have to place your other overlay at the top, on the floatPane. I do this for some of my InfoBoxes, which function as rectangle map label boxes. My goal was to put them above everything else on the map and they do appear above everything else (the map, markers, overlays, etc.).

Panoramio & Weather Layers zIndex Lower Than Polygon Overlay Google Maps API V3

Is it possible to make Panoramio Pictures and WeatherLayer icons appear above (have a higher zIndex than) a polygon?
I have a map with transparent Polygon Overlays, and when I add the Panoramio or WeatherLayers to the map, the Panoramio photos and weather icons appear below the polygon overlays.
The pictures and weather icons can be seen below the polygon because the polygon is partially transparent, but the user cannot interact with those photos or icons because the polygon is on top of them.
The screen shot below shows an example of this:
You can view an example page here.
You can add and remove the different overlays/layers. I've tried setting the zIndex of the polygon to negative numbers, but they always appear above the Panoramio and WeatherLayer icons.
The PanoramioLayer and PanoramioLayerOptions API references don't say anything about a zIndex. The same goes for the WeatherLayer and WeatherLayerOptions API references.
You're need to set option to the polygon:
clickable: false
But all polygon's mouse events won't work