Giter VIP home page Giter VIP logo

angular2-yandex-maps's People

Contributors

anteaterkit avatar gorniv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular2-yandex-maps's Issues

Работа с картами в ionic

Здравствуйте!

Подскажите пожалуйста, как работать с картами в ionic? Нигде не смог найти материалов и документации.

Is it possible to include library as NgModule?

I am not using SystemJS, but I need to import library via NgModule annotation. This is what I got: "Please add a @NgModule annotation.":

import { YaCoreModuleForRoot }  from 'angular2-yandex-maps';

...

@NgModule({
  declarations: [

    AppComponent,

  ],
  imports: [

    YaCoreModuleForRoot,

    ...
  ],

  bootstrap: [AppComponent]
})
export class AppModule {

}

Error(from web console):

Uncaught Error: Unexpected value 'YaCoreModuleForRoot' imported by the module 'AppModule'. Please add a @NgModule annotation.
    at syntaxError (compiler.es5.js:1690)
    at compiler.es5.js:15382
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver.webpackJsonp.../../../compiler/@angular/compiler.es5.js.CompileMetadataResolver.getNgModuleMetadata (compiler.es5.js:15365)
    at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._loadModules (compiler.es5.js:26795)
    at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileModuleAndComponents (compiler.es5.js:26768)
    at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler.compileModuleAsync (compiler.es5.js:26697)
    at PlatformRef_.webpackJsonp.../../../core/@angular/core.es5.js.PlatformRef_._bootstrapModuleWithZone (core.es5.js:4536)
    at PlatformRef_.webpackJsonp.../../../core/@angular/core.es5.js.PlatformRef_.bootstrapModule (core.es5.js:4522)
    at Object.../../../../../src/main.ts (main.ts:11)

Maps isn't visible

import {YaCoreModule} from 'angular2-yandex-maps';
@NgModule({
    imports: [
        ...
        YaCoreModule.forRoot()
    ],
...

And in template

<ya-map [latitude]="55.76" [longitude]="37.64">
            <ya-marker [latitude]="55.847" [longitude]="38.6">
            </ya-marker>
            <ya-marker [latitude]="55.847" [longitude]="35.6">
            </ya-marker>
</ya-map>

.

.

Выбор локалей

Возникла задача динамически изменять язык карты.
Есть ли возможность добавить @input для &lang? Или, может быть, можно это сделать как-то по-другому?

Работа с "controls"

Добрый день! Отличный модуль! спасибо вам за него! Он нам очень поможет, если мы сможем его удачно прикрутить!).
Есть несколько проблем, я надеюсь вы мне поможете.
Никак не могу найти способ управлять "controls", чтобы добавить к SearchControl параметры, например "boundedBy". Видел у вас issue на тему "работа с controls", но она закрыта. Не подскажете?

import angular2-yandex-maps in NgModule

поставили карты с помощью npm install angular2-yandex-maps
потом указали "angular2-yandex-maps": "^1.0.40", испытав описанные ниже проблемы переустановили зависимости с помощью npm install, поведение не изменилось.
Сборка с помощью AngularCli, версия ангуляра 4.3.4
Суть проблемы
В шаблоне компонента AppComponent лежит следующее:

        <ya-map [latitude]="lt" [longitude]="lg" [zoom]="8">
        </ya-map>

ожидаемо получаем ругань на незнакомые элементы в шаблоне. Идём и прописываем в NgModule следующее:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { MapComponent } from './map/map.component';
import { LeftBarComponent } from './left-bar/left-bar.component';
import { SubBarComponent } from './sub-bar/sub-bar.component';

import { YaCoreModule }  from 'angular2-yandex-maps';

@NgModule({
  imports: [
    BrowserModule, YaCoreModule.forRoot()
  ],
  declarations: [
    AppComponent,
    MapComponent,
    LeftBarComponent,
    SubBarComponent
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

на этапе загрузки страницы получаем ошибку

compiler.es5.js:1690 Uncaught Error: Unexpected value '[object Object]' imported by the module 'AppModule'. Please add a @NgModule annotation.
    at syntaxError (compiler.es5.js:1690)
    at compiler.es5.js:15382
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver.webpackJsonp.../../../compiler/@angular/compiler.es5.js.CompileMetadataResolver.getNgModuleMetadata (compiler.es5.js:15365)
    at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._loadModules (compiler.es5.js:26795)
    at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileModuleAndComponents (compiler.es5.js:26768)
    at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler.compileModuleAsync (compiler.es5.js:26697)
    at PlatformRef_.webpackJsonp.../../../core/@angular/core.es5.js.PlatformRef_._bootstrapModuleWithZone (core.es5.js:4536)
    at PlatformRef_.webpackJsonp.../../../core/@angular/core.es5.js.PlatformRef_.bootstrapModule (core.es5.js:4522)
    at Object.../../../../../src/main.ts (main.ts:11)

Кластер Event, ObjectManager Event

Здравствуйте! Можно ли добавить кластер click event чтоб получать данные о выбранном маркере. Тоже самое с objectManager хотелось бы получать выбранный маркер.
Спасибо.

Ошибка при подключении модуля на angular/common 4.0.1

При импортировании модуля "YaCoreModule.forRoot()" появляется ошибка.
Скрин package.json http://joxi.ru/nAyYvLgS1RVjAZ
image
Скрин модуля, в которые требуется провести импорт http://joxi.ru/E2peEWxHZ0beAY
image
Трейс ошибки:
"Uncaught (in promise): Error: Unexpected value '[object Object]' imported by the module 'DepositModule'. Please add a @NgModule annotation.
Error: Unexpected value '[object Object]' imported by the module 'DepositModule'. Please add a @NgModule annotation.
at Error.ZoneAwareError (http://localhost:8080/web-polyfills.js:7863:33)
at ZoneAwareError (http://localhost:8080/web-polyfills.js:7860:35)
at syntaxError (http://localhost:8080/web-common.js:6532:34)
at http://localhost:8080/web-common.js:18999:44
at Array.forEach (native)
at CompileMetadataResolver../node_modules/@angular/compiler/@angular/compiler.es5.js.CompileMetadataResolver.getNgModuleMetadata (http://localhost:8080/web-common.js:18982:49)
at JitCompiler../node_modules/@angular/compiler/@angular/compiler.es5.js.JitCompiler._loadModules (http://localhost:8080/web-common.js:30107:64)
at JitCompiler../node_modules/@angular/compiler/@angular/compiler.es5.js.JitCompiler._compileModuleAndComponents (http://localhost:8080/web-common.js:30066:52)
at JitCompiler../node_modules/@angular/compiler/@angular/compiler.es5.js.JitCompiler.compileModuleAsync (http://localhost:8080/web-common.js:30028:21)
at ModuleBoundCompiler../node_modules/@angular/compiler/@angular/compiler.es5.js.ModuleBoundCompiler.compileModuleAsync (http://localhost:8080/web-common.js:30396:31)
at MergeMapSubscriber.project (http://localhost:8080/web-common.js:58659:140)
at MergeMapSubscriber../node_modules/rxjs/operator/mergeMap.js.MergeMapSubscriber._tryNext (http://localhost:8080/web-common.js:92008:27)
at MergeMapSubscriber../node_modules/rxjs/operator/mergeMap.js.MergeMapSubscriber._next (http://localhost:8080/web-common.js:91998:18)
at MergeMapSubscriber../node_modules/rxjs/Subscriber.js.Subscriber.next (http://localhost:8080/web-common.js:88818:18)
at http://localhost:8080/web-common.js:90365:36
at ZoneDelegate.webpackJsonp../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (http://localhost:8080/web-polyfills.js:7235:26)
at Object.onInvoke (http://localhost:8080/web-common.js:35220:37)
at ZoneDelegate.webpackJsonp../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (http://localhost:8080/web-polyfills.js:7234:32)
at Zone.webpackJsonp../node_modules/zone.js/dist/zone.js.Zone.run (http://localhost:8080/web-polyfills.js:7031:43)
at http://localhost:8080/web-polyfills.js:7584:57
at ZoneDelegate.webpackJsonp../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (http://localhost:8080/web-polyfills.js:7268:31)
at Object.onInvokeTask (http://localhost:8080/web-common.js:35211:37)
at ZoneDelegate.webpackJsonp../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (http://localhost:8080/web-polyfills.js:7267:36)
at Zone.webpackJsonp../node_modules/zone.js/dist/zone.js.Zone.runTask (http://localhost:8080/web-polyfills.js:7071:47)
at drainMicroTaskQueue (http://localhost:8080/web-polyfills.js:7434:35)"

Прошу добавить возможность задавать цент карты по адресу

Раньше можно было задавать центр через адрес ya-center в AngularJS

<ya-map ya-zoom="14" ya-center="{{vuz.Region}}, {{vuz.Address}}" ya-before-init="beforeInit(vuz)" ya-after-init="afterInit($target)" ya-event-click="mapClick($event)"> <ya-collection ya-options="{preset: 'islands#dotIcon',iconColor: '#1faee9', balloonMaxWidth:250}"> <ya-geo-object *ngFor="let o of geoObjects" ya-source="o"></ya-geo-object> </ya-collection> </ya-map>

Angular 4 + Yandex map

Установил модуль

import { YaCoreModuleForRoot } from 'angular2-yandex-maps';

@NgModule({
imports: [
YaCoreModuleForRoot()
])}

в HTML:
<ya-map [latitude]="55.76" [longitude]="37.64">

В CSS:
.map-container-inner
{
width: 500px;
height: 500px;
}

Проблема 1:
После рендера блок карты почему-то имеет высоту 0.

Проблема 2:
После ручного исправления высоты

И клика по карте в консоле выдает:
Error: Map.getCenter: something is broken, getCenter returns NaN. Please let us know about this awful bug.

Как правильно импортировать angular2-yandex-maps?

Нулевая высота карты (angular 5)

добрый день, пытаюсь показать карту
<ya-map #map [latitude]="currentPosition.lat" [longitude]="currentPosition.lng" > <ya-marker [latitude]="currentPosition.lat" [longitude]="currentPosition.lng"></ya-marker> </ya-map>
карта и маркер отображается, но нулевой высоты.
как это можно подправить?

Disable controlls

How I can disable all controls?

I'm trying use empty array as argument, as ussialy in JS library, but not result

Thanks!

Подключение скрипта карт

Каждая инициализация карты добавляет строку

<script type="text/javascript" defer="" id="YaScript" src="https://api-maps.yandex.ru/2.1/?lang=ru_RU&callback=angular2YAMapsAPILoader"></script>

event о готовности карты

как определить, что контрол готов к работе?
мне надо получить текущее местоположение
на этот момент ymaps еще нету
ngOnInit() {
ymaps.geolocation.get().then(function (res) {
console.log(res);
}, function (e) {
console.log(e);
});
}

как обновить маркеры?

например рядом с картой у меня список маркеров,
по клику на элементе списка я меняю свойство preset.
в элементе оно меняется, а на карте нет.
как перерисовать маркер?
selectItem(marker){ var index = this.poi.indexOf(marker, 0); if (this.poi[index].select){ this.poi[index].preset = 'islands#blueDotIcon'; }else{ this.poi[index].preset = 'islands#redDotIcon'; } this.poi[index].select = !this.poi[index].select; }

Виден только первый plunker

Добрый день.
Получается посмотреть только demo 1. В остальных в логах ошибка
Error: (SystemJS) ReferenceError: exports is not defined
at eval (https://unpkg.com/angular2-yandex-maps/lib/ya-maps-types.js:2:23)
at eval ()
at Object.eval (https://unpkg.com/angular2-yandex-maps/lib/core.module.js:19:10)
at eval (https://unpkg.com/angular2-yandex-maps/lib/core.module.js:56:4)
Evaluating https://unpkg.com/angular2-yandex-maps/lib/ya-maps-types.js
Evaluating https://unpkg.com/angular2-yandex-maps/lib/core.module.js
Evaluating https://unpkg.com/angular2-yandex-maps/index.js
Error loading https://run.plnkr.co/bFDWTNEZ2SXFOR1I/src/main.ts
ZoneDelegate.invoke @ unpkg.com/[email protected]/dist/zone.js:392

И карта справа пустая. Подскажите пожалуйста как исправить. Браузер chrome 60.0.3112.113.

angular-cli не собирает build, aot компиляция

Hi, I ran into the connection problem of your library for Yandex angular maps. Can you help solve the problem?

ERROR in Error encountered resolving symbol values statically. Calling function 'YaCoreModule', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in /home/artem-123/workspace/bycard_mobile_front/src/app/app.module.ts, resolving symbol AppModule in /home/artem-123/workspace/bycard_mobile_front/src/app/app.module.ts

This error I get when building a build, but when working out everything is compiled normally, which is wrong? Here I am connecting:

import { YaCoreModule } from 'angular2-yandex-maps';
imports: [ YaCoreModule.forRoot() ],

What is my problem? Thank you!

Angular 5 + yandex maps

Если можно, добавьте поддержку для angular 5. Спасибо.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.