Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

custom build with ol.control.defaults.extend

Tags:

openlayers-3

I don't know how to define an export in my custom build. In my map definition I have:

controls: ol.control.defaults({ zoom: false, attribution: false })
  .extend([attribution])

But I can't seem to get the "exports" right in my build.json file. When I build I get errors like:

No matching symbol found: ol.control.defaults.extend

In my build.json file I have:

"ol.Attribution",
"ol.control.Attribution",
"ol.control.defaults",

Followed by each of the following, one at a time:

"ol.control#extend",
"ol.control.extend",
"ol.control.defaults#extend",
"ol.control.defaults.extend",

(Obviously the trial-and-error approach) Any clue as to what I'm overlooking? Is "extend" a member of some other object?

Thanks, Rich

like image 917
Richard Greenwood Avatar asked Dec 13 '25 09:12

Richard Greenwood


1 Answers

extend is a ol.Collection method, so add this "ol.Collection#extend" to your build.json.

like image 139
Jonatas Walker Avatar answered Dec 15 '25 20:12

Jonatas Walker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!