Marker shadows are not shown in gmap, primefaces

Antonio Otero Andria

I don't know if I have to do anything else, but I set the shadows of the markers, but these are not shown on the map

this is my XHTML

        <script src="http://maps.google.com/maps/api/js?sensor=true|false"
        type="text/javascript"></script>
        <script>
//<![CDATA[
function handleComplete(xhr, status, args){
var gmap = PF('gMapWV').getMap();
for(var i in gmap.markers)
{
  var newMarker = eval("args.marker"+i);
  var newPosition = eval("args.position"+i);
  var oldMarker = gmap.markers[i];
  oldMarker.setPosition(newPosition);
  oldMarker.icon=newMarker.icon;
  oldMarker.setShadow("https://maps.gstatic.com/mapfiles/ms2/micons/msmarker.shadow.png");
  oldMarker.setMap(gmap);
}   
}
// ]]>
</script>
</ui:define>
....
                <p:poll interval="#{manageLoadExecution.refreshInterval}" listener="#{manageLoadExecution.ajaxPoll}" oncomplete="handleComplete(xhr, status, args)" />
            <p:gmap widgetVar="gMapWV" id="gMapWV" center="#{manageLoadExecution.latitude} , #{manageLoadExecution.longitude}"  zoom="#{manageLoadExecution.zoomLevel}" fitBounds="false" type="terrain"  style="width:900px;height:400px" model="#{manageLoadExecution.mapLoadModel}" disableDefaultUI="false" >
                <p:ajax event="overlaySelect" listener="#{manageLoadExecution.onMarkerSelect}" />

                <p:gmapInfoWindow id="infoWindow" maxWidth="300">
                    <p:outputPanel  style="text-align: left; display: block; margin: auto; height:270px; width:320px" rendered="#{! empty manageLoadExecution.selectedLoad}">

and this is my managed Bean

 if(load.getColBuId() != null){
         Marker colMarker = new Marker(new LatLng(load.getColBuId().getLatitude(),load.getColBuId().getLongitude()),load.getColBuId().getRef());
         colMarker.setIcon(Constants.POI_COL_SITE);
         colMarker.setShadow(Constants.POI_SHADOW);
         markColList.add(colMarker);
      }
      if(load.getDelBuId() != null){
         Marker delMarker = new Marker(new LatLng(load.getDelBuId().getLatitude(),load.getDelBuId().getLongitude()),load.getDelBuId().getRef());
         delMarker.setIcon(Constants.POI_WELL_SITE);
         delMarker.setShadow(Constants.POI_SHADOW);
         markDelList.add(delMarker);
      }
      if(load.getLoadStatus().getLastLatitude() != null && load.getLoadStatus().getLastLongitude()!=null){
         String alert = Constants.POI_LOAD_OK;
         if(load.getMaxAlert()!= null && load.getMaxAlert()=='H'){
            alert=Constants.POI_LOAD_ALERT;
         }
         //Marker loadMarker = new Marker(new LatLng(load.getLoadStatus().getLastLatitude(),load.getLoadStatus().getLastLongitude()),load.getRef(),alert,alert);
         Marker loadMarker = new Marker(new LatLng(load.getLoadStatus().getLastLatitude(),load.getLoadStatus().getLastLongitude()),load.getRef());
         loadMarker.setIcon(alert);
         loadMarker.setShadow(Constants.POI_SHADOW);
         markLoadList.add(loadMarker);
      }

Icons are shown right, however shadows are not shown. Have I missing any step? Have I forgot to set any property? Path to images are ok, In fact I am using:

https://maps.gstatic.com/mapfiles/ms2/micons/msmarker.shadow.png

as shadow image

Thank you very much in advance

AniV

The Marker Shadows were removed in version 3.14 of the Google Maps Javascript API. Any shadows specified programmatically will be ignored.

It is from the official Google Documentation: https://developers.google.com/maps/documentation/javascript/markers#complex_icons

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Polygons are not shown on gmap

From Dev

fitBounds in PrimeFaces gmap component

From Dev

primefaces gmap search center

From Dev

Gmap.net marker removal

From Dev

Center to the current position in a Primefaces gmap

From Dev

PrimeFaces GMap - Drawing multiple polygons

From Dev

primefaces 5.0 gmap widget error

From Dev

primefaces qr code not shown?

From Dev

ApplicationRollBackException not shown in primefaces messages

From Dev

ng-model into ui-gmap-marker

From Dev

GMap.Net marker initially in incorrect position

From Dev

GMap.NET WPF Marker timer update

From Dev

PrimeFaces GMap ignores model tag, not displaying markers

From Dev

Gmap Primefaces Geocode customized error message

From Dev

Marker click event not firing for ui-gmap-marker in Map Controller

From Dev

Leaflet context menu not shown on marker

From Dev

Use HTML element instead of icon for map marker with gmap3?

From Dev

GMap.Net zooming issue mouseovering / hovering a marker

From Dev

GMAP3 populating multiple marker addresses thru ajax get

From Dev

primefaces GMap example not working and don't know why

From Dev

Primefaces GMap, How to update zoom after pointSelect Event

From Dev

Why MissingKeyMapError using tag p:gmap with primefaces (in the simplest example)?

From Dev

Android MapView Marker Text title not shown

From Dev

Marker not shown in google-maps-react

From Dev

Get marker position before dragging primefaces

From Dev

Gmap.Net Marker at incorrect position but when the map is zoomed the marker goes to right place

From Dev

Some Pictures don't shown using primefaces-5.0.jar

From Dev

how to open marker window from another event using Gmap4rails

From Dev

How do I pass a value from a ui-gmap-windows InfoWindow/Marker to ui-sref?

Related Related

  1. 1

    Polygons are not shown on gmap

  2. 2

    fitBounds in PrimeFaces gmap component

  3. 3

    primefaces gmap search center

  4. 4

    Gmap.net marker removal

  5. 5

    Center to the current position in a Primefaces gmap

  6. 6

    PrimeFaces GMap - Drawing multiple polygons

  7. 7

    primefaces 5.0 gmap widget error

  8. 8

    primefaces qr code not shown?

  9. 9

    ApplicationRollBackException not shown in primefaces messages

  10. 10

    ng-model into ui-gmap-marker

  11. 11

    GMap.Net marker initially in incorrect position

  12. 12

    GMap.NET WPF Marker timer update

  13. 13

    PrimeFaces GMap ignores model tag, not displaying markers

  14. 14

    Gmap Primefaces Geocode customized error message

  15. 15

    Marker click event not firing for ui-gmap-marker in Map Controller

  16. 16

    Leaflet context menu not shown on marker

  17. 17

    Use HTML element instead of icon for map marker with gmap3?

  18. 18

    GMap.Net zooming issue mouseovering / hovering a marker

  19. 19

    GMAP3 populating multiple marker addresses thru ajax get

  20. 20

    primefaces GMap example not working and don't know why

  21. 21

    Primefaces GMap, How to update zoom after pointSelect Event

  22. 22

    Why MissingKeyMapError using tag p:gmap with primefaces (in the simplest example)?

  23. 23

    Android MapView Marker Text title not shown

  24. 24

    Marker not shown in google-maps-react

  25. 25

    Get marker position before dragging primefaces

  26. 26

    Gmap.Net Marker at incorrect position but when the map is zoomed the marker goes to right place

  27. 27

    Some Pictures don't shown using primefaces-5.0.jar

  28. 28

    how to open marker window from another event using Gmap4rails

  29. 29

    How do I pass a value from a ui-gmap-windows InfoWindow/Marker to ui-sref?

HotTag

Archive