Giter Club home page Giter Club logo

ol3-map-widget's Introduction

OpenLayers Map Widget

Tests Coverage Status

Map viewer WireCloud widget uses OpenLayers. It can receive Layers or Point of Interest data and display them on the map.

Build

Be sure to have installed Node.js and Bower in your system. For example, you can install it on Ubuntu and Debian running the following commands:

curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install nodejs
sudo apt-get install npm
sudo npm install -g bower

Install other npm dependencies by running:

npm install

In order to build this operator you need to download grunt:

sudo npm install -g grunt-cli

And now, you can use grunt:

grunt

If everything goes well, you will find a wgt file in the dist folder.

Documentation

Documentation about how to use this widget is available on the User Guide. Anyway, you can find general information about how to use widgets on the WireCloud's User Guide available on Read the Docs.

Copyright and License

Copyright (c) 2016-2017 CoNWeT Lab., Universidad Politecnica de Madrid Copyright (c) 2017-2019 Future Internet Consulting and Development Solutions S.L.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

ol3-map-widget's People

Contributors

aarranz avatar fisuda avatar jason-fox avatar mognom avatar rafitanba avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ol3-map-widget's Issues

Error when running ol3 widget

Hi, when I try to add OL3 widget, I had this error on the widget log :

ReferenceError: Widget is not defined
Details
File: js/main.js
Line: 24

ReferenceError: ol is not defined
Details
File: js/ol3-map-widget.js
Line: 14

Thanks for help !

Error occurs when clicking 'Layers' button

Hello @aarranz Sir,

The following error occurs when clicking 'Layers' button.

DashboardManagementAPI.js?v=33ed68a1f4ec0d53650ed4d41afb9985cd524a6c:171 Uncaught TypeError: invalid widget ref
    at Object.addWidget (DashboardManagementAPI.js?v=33ed68a1f4ec0d53650ed4d41afb9985cd524a6c:171)
    at HTMLDivElement.<anonymous> (ol3-map-widget.js:231)

File: js/ol3-map-widget.js:231

this.layers_widget = MashupPlatform.mashup.addWidget('CoNWeT/layer-selector/0.4', {refposition:event.target.getBoundingClientRect()});

It seems that this error occurs because of not found a widget 'CoNWeT/layer-selector/0.4'.
Although I looked for this source code, I wasn't able to find it.

If this widget is an open source, would you please tell me where it is?

Send update events on the selected PoIs

When the user selects a PoI, an event is sent through the wiring, but any update get lost as the widget does not send them through the wiring.

Would be great if the widget send those updates through the wiring to be able to provide the user allways the latest available information.

Green object on openLayers

Hello,

How do I make the green object to appear on the map as in the tutorial? I am also having issue when getting the data from geojson data from a device. THank you.

image

Technical difficulty building OpenLayers 3 Widget on MAC

I am experiencing difficulty building this widget on MAC. I can confirm that Node.js and Bower are installed. Steps:

$ brew install nodejs
Warning: node 11.12.0 is already installed, it's just not linked
You can use `brew link node` to link this version.

$ brew install npm
Warning: node 11.12.0 is already installed, it's just not linked
You can use `brew link node` to link this version.

$ brew link node
Linking /usr/local/Cellar/node/11.12.0...
Error: Could not symlink include/node/common.gypi
Target /usr/local/include/node/common.gypi
already exists. You may want to remove it:
  rm '/usr/local/include/node/common.gypi'

To force the link and overwrite all conflicting files:
  brew link --overwrite node

To list all files that would be deleted:
  brew link --overwrite --dry-run node

$ npm install -g bower
env: node: No such file or directory
  
$ brew install -g bower
Updating Homebrew...
Warning: bower 1.8.8 is already installed, it's just not linked
You can use `brew link bower` to link this version.

$ npm install
env: node: No such file or directory

$ brew install -g grunt-cli
Warning: grunt-cli 1.3.2 is already installed, it's just not linked
You can use `brew link grunt-cli` to link this version.

$grunt
env: node: No such file or directory

I repeat this same process on Ubuntu, it fails too.

A popup sometimes is NOT shown when clicking a marker

Hi @aarranz,

I encountered an error that a popup sometimes isn't shown when clicking a marker.

This condition to reproduce this issue is when scrolling a map across the international date line and clicking a marker.

  • How to reproduce it

NG: Scroll the map to the right across the international date line and click a marker. A popup is NOT be shown.

png1

OK: Scroll the map to the left and click a marker. A popup is shown.

png2

  • How to build an environment to reproduce it.
  1. You do wiring the Json injector, NGSI Entity To PoI and OpenLayers Map v1.13 widget.

png5

  1. You set values in ol3 settings. Please set Initial Location to '135,34.7'.

png4

  1. You send a following json data with Json injector.

png3

[
  {
    "id": "place001",
    "type": "PointOfInterest",
    "name": "San Francisco",
    "location": {
      "type": "Point",
      "coordinates": [-122.4194,37.7749]
    }
  }
] 

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.