@jasper07 : I am unable to setMap for new Marker, could you please tell me why ?
My Map is as below
var oMap = new openui5.googlemaps.Map(mapId, { lat: oPos.lat, lng: oPos.lng, height: ($(document).height()) * 0.9 + "px", zoom: 10, markers: { path: "/stations", template: oMarkers } });
my Marker template is as Below
var oMarkers = new openui5.googlemaps.Marker({ lat: '{lat}', lng: '{lng}', info: '{info}', icon: '{icon}', click: onMarkerClick });
my new marker is as below
var currentLocationMarker = new openui5.googlemaps.Marker({ info: "Current Location", lat: oPos.lat, lng: oPos.lng, icon: "resources/img/current_work.png" });
and I trying to set the Marker to the above map like this
currentLocationMarker.setMap(oMap); currentLocationMarker.setMarker();
However I am getting this error in the console
Could please tell me why this issue is occuring "InvalidValueError: setMap: not an instance of Map; and not an instance of StreetViewPanorama", I am fairly new to this hence any advise will be helpful.
@jasper07 : I am unable to setMap for new Marker, could you please tell me why ?
My Map is as below
var oMap = new openui5.googlemaps.Map(mapId, { lat: oPos.lat, lng: oPos.lng, height: ($(document).height()) * 0.9 + "px", zoom: 10, markers: { path: "/stations", template: oMarkers } });
my Marker template is as Belowvar oMarkers = new openui5.googlemaps.Marker({ lat: '{lat}', lng: '{lng}', info: '{info}', icon: '{icon}', click: onMarkerClick });
my new marker is as below
var currentLocationMarker = new openui5.googlemaps.Marker({ info: "Current Location", lat: oPos.lat, lng: oPos.lng, icon: "resources/img/current_work.png" });
and I trying to set the Marker to the above map like this
currentLocationMarker.setMap(oMap); currentLocationMarker.setMarker();
However I am getting this error in the console Could please tell me why this issue is occuring "InvalidValueError: setMap: not an instance of Map; and not an instance of StreetViewPanorama", I am fairly new to this hence any advise will be helpful.
Thanks, Prateek