Topic: determin 2d or 3d marker from OnlineMapsMarkerBase

Hiya,

what is the best way to determine if a marker is 2d or 3d given a base marker reference.

Re: determin 2d or 3d marker from OnlineMapsMarkerBase

Hello.

bool is2D = marker is OnlineMapsMarker;
bool is3D = marker is OnlineMapsMarker3D;
Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: determin 2d or 3d marker from OnlineMapsMarkerBase

Sorry I didn't word the question correctly, I have a base marker, and I want to reference the 2d/3d version of it, so cast it to it's correct type

So something like
if(marker is 3dmarker)
     cast marker to 3dmarker
     3dmarker.dosomething();

Re: determin 2d or 3d marker from OnlineMapsMarkerBase

OnlineMapsMarker3D m3d = marker as OnlineMapsMarker3D;
if (m3d != null)
{
    m3d.dosomething();
}
Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.