Example #1
0
    // Método que instancia MapMarker, establece los parametros de inicio y
    // añade los puntos a representar desde la lista mapPoints
    private void initMarkers()
    {
        map = new MapMarker();
        map.clusterPrefab = prefabCluster;

        //map.fixPositionInterval(OnlineMaps.instance, 28.24f, -16.79f, 71.19f, 48.48f);
        map.setViewerPosition(10.23985f, 21.83287f);
        OnlineMaps.instance.zoom = 3;
        map.setViewerZoom(3);

        map.setGridingZoomData(3, 12, 8); // CAmbio 2,10,6 por 2,14,4
        map.setGridingQuadsHorizonal(8);  // cambio 16 por 8
        map.fixZoomInterval(OnlineMaps.instance, 3, 12);

        SilkMap.Instance.map = map;
        //ClonedMap.instance.setMap(map);
        if (clonedMapGroup != null)
        {
            SilkMap.instance.clonedGroupMap = clonedMapGroup;
        }

        //map.showClusters();

        map.SetDimension(2);

        UpdatePropertyManager(SilkMap.instance.map);

        OnlineMapsMarkerManager.instance.defaultTexture = getDefaultTexture();

        /*
         * GameObject lightGameObject = new GameObject("The Light");
         * Light lightComp = lightGameObject.AddComponent<Light>();
         * lightComp.type = LightType.Directional;
         * lightComp.color = Color.white;
         * lightGameObject.transform.position = new Vector3(0, 5, 0);
         * lightGameObject.transform.Rotate(new Vector3(45, 0, 0), Space.Self);
         */
        Resources.UnloadUnusedAssets();
    }