Page 2 of 2

contentLabel display issue in Google maps marker

Posted: Thu Oct 16, 2014 2:55 am
by Cody Blue

Hi Yurii,

Yes, I realize that but had missed where to include the style sheet. Having created a new CSS file in Appery has solved my problem.

Thanks for your feedback on it.
Regards.


contentLabel display issue in Google maps marker

Posted: Sun Aug 16, 2015 8:12 pm
by Vinny B

This is a big help but I am having a one problem. The labels show and the marker shows at the same time how can i hide the markers?

Image


contentLabel display issue in Google maps marker

Posted: Sun Aug 16, 2015 8:29 pm
by Vinny B

Here is my code

var list_location = localStorage.getItem('mysqlFireCompaniesArray');
var obj = JSON.parse(list_location);
var coordsArray = obj;
var marker;

var map = Appery("googlemap_6").options.mapElement.gmap('get', 'map');
for (var i = 0, j = coordsArray.length; i < j; i++) {
var marker = new MarkerWithLabel({
position: new google.maps.LatLng( coordsArray.Lat, coordsArray.Lon ), icon:'',
labelContent: coordsArray.Engine,
map: map,
labelAnchor: new google.maps.Point(22, 0),
labelClass: "labels", // the CSS class for the label
labelStyle: {opacity: 0.75},

//map: Appery("googlemap_6").gmap
});

}


contentLabel display issue in Google maps marker

Posted: Mon Aug 24, 2015 5:39 am
by Yurii Orishchuk

HI Vinny,

To remove marker you need to handle it's object in some variable/array.

For this goal you need to add any new marker in array. Then you can clear this array with code:

pre

marker&#46;setMap(null);

/pre

Please read more about solution here: https://developers.google.com/maps/do...

Regards.